-
-
Notifications
You must be signed in to change notification settings - Fork 12
59 lines (57 loc) · 2.76 KB
/
BuildArchIso.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
name: Build Arch 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@v3
- name: Build In Docker
if: ${{ !contains(github.event.head_commit.message, '[no build]') }}
run: |
cat << EOF > entrypoint.sh
cd /build
useradd builduser -m
passwd -d builduser
pacman-key --init
pacman-key --populate
pacman -Syu --noconfirm --needed reflector curl
reflector --country $(curl ipv4.myip.wtf/text/country) --sort rate -n 5 --save /etc/pacman.d/mirrorlist
pacman -S --noconfirm --needed sudo git base-devel
printf 'builduser ALL=(ALL) ALL\\n' | tee -a /etc/sudoers
chown -R builduser:builduser ./
sudo -u builduser bash -c './prepare.sh'
sudo -u builduser bash -c './build.sh'
EOF
docker run --privileged -t -v $PWD:/build archlinux /bin/bash /build/entrypoint.sh
- name: Upload Built ISO
if: ${{ github.ref == 'refs/heads/senpai' && !contains(github.event.head_commit.message, '[no rel]') && !contains(github.event.head_commit.message, '[no build]') }}
uses: actions/upload-artifact@v3
with:
name: built-iso
path: ${{ github.workspace }}/out/archlinux-t2-*.iso
- name: Create Tag
id: create_tag
if: ${{ github.ref == 'refs/heads/senpai' && !contains(github.event.head_commit.message, '[no rel]') && !contains(github.event.head_commit.message, '[no build]') }}
run: |
export TAG=$(date +%Y.%m.%d)
echo "tag=${TAG}" >> $GITHUB_OUTPUT
echo $TAG
- name: Release
if: ${{ github.ref == 'refs/heads/senpai' && !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/archlinux-t2-*.iso
tag_name: ${{ steps.create_tag.outputs.tag }}
name: archlinux-t2-${{ steps.create_tag.outputs.tag }} - Release Adashima 6.9
draft: ${{ contains(github.event.head_commit.message, '[draft]') }}
prerelease: ${{ contains(github.event.head_commit.message, '[prerel]') }}
body: |
This release features Sakura Adachi from Adachi and Shimamura!
Every major release will feature new anime/manga and minor releases will have different characters!
Note that Arch ISO release follows kernel release name.
Follow [this guide](https://wiki.t2linux.org/distributions/arch/installation/) using this ISO to install Arch on your T2 Mac
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}