forked from endeavouros-team/EndeavourOS-ISO
-
Notifications
You must be signed in to change notification settings - Fork 4
84 lines (79 loc) · 4 KB
/
BuildISO.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: Build EndeavourOS ISO
on: [push, pull_request, workflow_dispatch]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
if: ${{ !contains(github.event.head_commit.message, '[no build]') }}
uses: actions/checkout@v2
- name: Build In Docker
if: ${{ !contains(github.event.head_commit.message, '[no build]') }}
run: |
cat << \EOF > entrypoint.sh
pacman -Syu base base-devel reflector --needed --noconfirm
reflector --verbose --country $(curl https://ipv4.myip.wtf/text/country) --protocol http,https --latest 10 --sort rate --save /etc/pacman.d/mirrorlist
pacman-key --init
pacman -Syu wget --needed --noconfirm
pacman -Syu archlinux-keyring --noconfirm
cd /etc/pacman.d/
touch endeavouros-mirrorlist
echo "Server = https://mirror.funami.tech/endeavouros/repo/\$repo/\$arch" > endeavouros-mirrorlist
echo "Server = https://mirror.jingk.ai/endeavouros/repo/\$repo/\$arch" >> endeavouros-mirrorlist
cat endeavouros-mirrorlist
cd ..
printf "\n" >> pacman.conf
echo "[endeavouros]" >> pacman.conf
echo "SigLevel = Never" >> pacman.conf
echo "Include = /etc/pacman.d/endeavouros-mirrorlist" >> pacman.conf
printf "\n" >> pacman.conf
cat pacman.conf
wget https://raw.githubusercontent.com/endeavouros-team/keyring/main/endeavouros.gpg -O endeavouros.gpg
wget https://mirror.funami.tech/endeavouros/repo/endeavouros/x86_64/endeavouros-keyring-20231222-1-any.pkg.tar.zst
pacman -U endeavouros-keyring-20231222-1-any.pkg.tar.zst --noconfirm --needed
pacman-key --add endeavouros.gpg && sudo pacman-key --lsign-key 497AF50C92AD2384C56E1ACA003DB8B0CB23504F
pacman-key --populate
pacman-key --recv-keys 8BE1FEE14302371DEF6F910A0E5877AC225D1980 --keyserver hkps://keyserver.ubuntu.com
pacman-key --lsign-key 8BE1FEE14302371DEF6F910A0E5877AC225D1980
pacman-key --populate
pacman -Syu
pacman-key --populate
pacman-key --populate archlinux
cd /build
useradd builduser -m
passwd -d builduser
pacman -Syu --noconfirm --needed sudo git base-devel
pacman -S archiso mkinitcpio-archiso git squashfs-tools --needed --noconfirm
printf "builduser ALL=NOPASSWD: ALL\n" | tee -a /etc/sudoers
chown -R builduser:builduser ./
sudo -u builduser bash ./prepare.sh
./mkarchiso "."
EOF
docker run --privileged -t -v $PWD:/build archlinux /bin/bash /build/entrypoint.sh
- name: Upload Built ISO
if: ${{ github.ref == 'refs/heads/galileo' && !contains(github.event.head_commit.message, '[no rel]') && !contains(github.event.head_commit.message, '[no build]') }}
uses: actions/upload-artifact@v2
with:
name: built-iso
path: ${{ github.workspace }}/out/*.iso
- name: Create Tag
id: create_tag
if: ${{ github.ref == 'refs/heads/galileo' && !contains(github.event.head_commit.message, '[no rel]') && !contains(github.event.head_commit.message, '[no build]') }}
run: |
export TAG=$(date +%Y.%m.%d)
echo "::set-output name=tag::${TAG}"
echo $TAG
- name: Release
if: ${{ github.ref == 'refs/heads/galileo' && !contains(github.event.head_commit.message, '[no rel]') && !contains(github.event.head_commit.message, '[no build]') }}
uses: softprops/action-gh-release@v1
with:
files: |
${{ github.workspace }}/out/*.iso
tag_name: ${{ steps.create_tag.outputs.tag }}
name: ${{ steps.create_tag.outputs.tag }}
draft: ${{ contains(github.event.head_commit.message, '[draft]') }}
prerelease: ${{ contains(github.event.head_commit.message, '[prerel]') }}
body: |
Follow [this guide](https://wiki.t2linux.org/distributions/endeavouros/installation/) using this ISO to install EndeavourOS on your T2 Mac
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}