This repository has been archived by the owner on Jan 4, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
185 lines (176 loc) · 5.5 KB
/
test_action.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
name: Test container workflow
on:
push:
branches:
- main
pull_request:
jobs:
run-main-build:
name: Build uBlue-OS Main
continue-on-error: false
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write
strategy:
fail-fast: false
max-parallel: 5
matrix:
image_name:
- silverblue
- kinoite
- sericea
- onyx
- base
- lxqt
- lazurite
- mate
- vauxite
major_version:
- 39
image_variant:
- nokmods
include:
- major_version: 39
support: latest
#- major_version: 38
# support: gts
exclude:
# There is no Fedora 39 version of lxqt as it was replaced by lazurite
- image_name: lxqt
major_version: 39
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build image
uses: ./
with:
image_name: ${{ matrix.image_name }}
image_variant: ${{ matrix.image_variant }}
version: ${{ matrix.major_version }}
support: ${{ matrix.support }}
signing_key: ${{ secrets.SIGNING_SECRET }}
target: ${{ matrix.image_variant }}
container_registry: ghcr.io/${{ github.repository }}
container_repo: ublue-os/main
container_ref: main
- name: Delete temp packages
run: |
if [[ "${{ matrix.image_variant }}" == "main" ]]
then
image_name=${{ matrix.image_name }}
elif [[ "${{ matrix.image_variant }}" =~ "main-*" ]]
then
variant=${{ matrix.image_variant }}
image_name=${{ matrix.image_name }}-${variant:5}
else
image_name=${{ format('{0}-{1}', matrix.image_name, matrix.image_variant) }}
fi
curl -L \
-X DELETE \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ github.token }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/user/packages/container/${{ github.event.repository.name }}/${image_name}
run-bluefin-build:
name: Build uBlue-OS Bluefin
continue-on-error: false
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write
strategy:
fail-fast: false
max-parallel: 5
matrix:
image_name:
- bluefin
- bluefin-dx
major_version:
- 39
image_variant:
- main
- nvidia
- asus
- asus-nvidia
- framework
- surface
- surface-nvidia
include:
- major_version: 39
support: latest
#- major_version: 38
# support: gts
exclude:
# There is no Fedora 39 version of lxqt as it was replaced by lazurite
- image_name: lxqt
major_version: 39
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Determine AKMODS_FLAVOR
run: |
if [[ "${{ matrix.image_variant }}" =~ ^asus* ]]; then
echo "AKMODS_FLAVOR=asus" >> $GITHUB_ENV
elif [[ "${{ matrix.image_variant }}" =~ ^surface* ]]; then
echo "AKMODS_FLAVOR=surface" >> $GITHUB_ENV
else
echo "AKMODS_FLAVOR=main" >> $GITHUB_ENV
fi
- name: Build image
uses: ./
with:
image_name: ${{ matrix.image_name }}
image_variant: ${{ matrix.image_variant }}
version: ${{ matrix.major_version }}
support: ${{ matrix.support }}
signing_key: ${{ secrets.SIGNING_SECRET }}
target: ${{ matrix.image_name }}
extra_build_args: |
AKMODS_FLAVOR=${{ env.AKMODS_FLAVOR }}
container_registry: ghcr.io/${{ github.repository }}
container_repo: ublue-os/bluefin
container_ref: main
- name: Delete temp packages
run: |
if [[ "${{ matrix.image_variant }}" == "main" ]]
then
image_name=${{ matrix.image_name }}
elif [[ "${{ matrix.image_variant }}" =~ "main-*" ]]
then
variant=${{ matrix.image_variant }}
image_name=${{ matrix.image_name }}-${variant:5}
else
image_name=${{ format('{0}-{1}', matrix.image_name, matrix.image_variant) }}
fi
curl -L \
-X DELETE \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ github.token }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/users/${{ github.repository_owner }}/packages/container/${{ github.event.repository.name }}%2F${image_name}
check:
name: Check build successful
if: ${{ !cancelled() }}
runs-on: ubuntu-latest
needs:
- run-main-build
- run-bluefin-build
steps:
- name: Exit on failure for main
if: ${{ needs.run-main-build.result == 'failure' || needs.run-main-build.result == 'skipped' }}
shell: bash
run: exit 1
- name: Exit on failure for bluefin
if: ${{ needs.run-bluefin-build.result == 'failure' || needs.run-bluefin-build.result == 'skipped' }}
shell: bash
run: exit 1
- name: Exit
shell: bash
run: exit 0