-
-
Notifications
You must be signed in to change notification settings - Fork 9
81 lines (77 loc) · 2.34 KB
/
build.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
name: Build ISO images
on:
push:
branches:
- lapis
paths:
- "kickstarts/**"
- "!kickstarts/docker/**"
workflow_dispatch:
jobs:
build:
runs-on: ${{ matrix.arch == 'aarch64' && 'ARM64' || 'ubuntu-latest' }}
strategy:
fail-fast: false
matrix:
arch:
- x86_64
- aarch64
variant:
- budgie
- gnome
- pantheon
- plasma
container:
image: fedora:38
options: --privileged
steps:
- name: Prepare loop devices
run: |
for i in $(seq 0 23);
do
sudo mknod -m 0660 /dev/loop$i b 7 0 2> /dev/null || true
done
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Install repositories
run: |
sudo dnf install -y dnf-plugins-core
sudo dnf config-manager --add-repo https://github.com/andaman-common-pkgs/subatomic-repos/raw/main/terra38.repo
sudo dnf install -y lorax-lmc-novirt pykickstart make
- name: Build ISO
run: |
./build.sh ${{ matrix.variant }}
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.variant }}-${{ matrix.arch }}
path: build/
deployment:
runs-on: ubuntu-latest
environment: production
needs: build
steps:
- uses: actions/download-artifact@v3
- name: Prepare images directory
run: |
mkdir -p images
variants=(budgie gnome pantheon plasma)
archs=(x86_64 aarch64)
for variant in "${variants[@]}"; do
for arch in "${archs[@]}"; do
name=$([ "$variant" == "budgie" ] && echo "flagship" || echo "$variant")
mv ${variant}-${arch}/image/*.iso images/ultramarine-${name}-${arch}.iso
sha256sum images/ultramarine-${name}-${arch}.iso > images/ultramarine-${name}-${arch}.iso.sha256sum
done
done
- name: Upload to R2
uses: shallwefootball/s3-upload-action@master
with:
endpoint: ${{ secrets.S3_ENDPOINT }}
aws_key_id: ${{ secrets.S3_KEY_ID }}
aws_secret_access_key: ${{ secrets.S3_SECRET_KEY }}
aws_bucket: "images"
source_dir: "images"
destination_dir: isos/ultramarine/38/