63
63
fedora_version : [40]
64
64
include :
65
65
- fedora_version : 40
66
+ bazzite_version : " v3.6"
66
67
is_latest_version : true
67
68
is_stable_version : true
68
69
kernel_flavor : fsync # must match a kernel_flavor from akmods repo
@@ -135,64 +136,6 @@ jobs:
135
136
- name : Maximize build space
136
137
uses : ublue-os/remove-unwanted-software@v7
137
138
138
- - name : Generate tags
139
- id : generate-tags
140
- shell : bash
141
- run : |
142
- # Generate a timestamp for creating an image version history
143
- TIMESTAMP="$(date +%Y%m%d)"
144
- FEDORA_VERSION="${{ matrix.fedora_version }}"
145
- COMMIT_TAGS=()
146
- BUILD_TAGS=()
147
- # Have tags for tracking builds during pull request
148
- SHA_SHORT="${GITHUB_SHA::7}"
149
- COMMIT_TAGS+=("pr-${{ github.event.pull_request.number }}-${FEDORA_VERSION}")
150
- COMMIT_TAGS+=("${SHA_SHORT}-${FEDORA_VERSION}")
151
- if [[ "${{ matrix.is_latest_version }}" == "true" ]] && \
152
- [[ "${{ matrix.is_stable_version }}" == "true" ]]; then
153
- COMMIT_TAGS+=("pr-${{ github.event.pull_request.number }}")
154
- COMMIT_TAGS+=("${SHA_SHORT}")
155
- fi
156
-
157
- if [[ ${{ github.ref_name }} == "unstable" ]]; then
158
- BUILD_TAGS=("${FEDORA_VERSION}-unstable" "${FEDORA_VERSION}-unstable-${TIMESTAMP}")
159
- if [[ "${{ matrix.is_latest_version }}" == "true" ]] && \
160
- [[ "${{ matrix.is_stable_version }}" == "true" ]]; then
161
- BUILD_TAGS+=("unstable")
162
- echo "DEFAULT_TAG=unstable" >> $GITHUB_ENV
163
- fi
164
- elif [[ ${{ github.ref_name }} == "testing" ]]; then
165
- BUILD_TAGS=("${FEDORA_VERSION}-testing" "${FEDORA_VERSION}-testing-${TIMESTAMP}")
166
- if [[ "${{ matrix.is_latest_version }}" == "true" ]] && \
167
- [[ "${{ matrix.is_stable_version }}" == "true" ]]; then
168
- BUILD_TAGS+=("testing")
169
- echo "DEFAULT_TAG=testing" >> $GITHUB_ENV
170
- fi
171
- else
172
- BUILD_TAGS=("${FEDORA_VERSION}" "${FEDORA_VERSION}-${TIMESTAMP}")
173
- BUILD_TAGS+=("${FEDORA_VERSION}-stable" "${FEDORA_VERSION}-stable-${TIMESTAMP}")
174
- if [[ "${{ matrix.is_latest_version }}" == "true" ]] && \
175
- [[ "${{ matrix.is_stable_version }}" == "true" ]]; then
176
- BUILD_TAGS+=("latest" "stable")
177
- echo "DEFAULT_TAG=latest" >> $GITHUB_ENV
178
- fi
179
- fi
180
-
181
- if [[ "${{ github.event_name }}" == "pull_request" ]]; then
182
- echo "Generated the following commit tags: "
183
- for TAG in "${COMMIT_TAGS[@]}"; do
184
- echo "${TAG}"
185
- done
186
- alias_tags=("${COMMIT_TAGS[@]}")
187
- else
188
- alias_tags=("${BUILD_TAGS[@]}")
189
- fi
190
- echo "Generated the following build tags: "
191
- for TAG in "${BUILD_TAGS[@]}"; do
192
- echo "${TAG}"
193
- done
194
- echo "alias_tags=${alias_tags[*]}" >> $GITHUB_OUTPUT
195
-
196
139
- name : Pull main, akmods, rechunk images
197
140
198
141
with :
@@ -206,7 +149,7 @@ jobs:
206
149
sudo podman pull ${{ env.IMAGE_REGISTRY }}/akmods-nvidia:${{ matrix.kernel_flavor}}-${{ matrix.fedora_version }}
207
150
208
151
# Add rechunk as well to remove this source of failure
209
- sudo podman pull ghcr.io/hhd-dev/rechunk:v0.2.1
152
+ sudo podman pull ghcr.io/hhd-dev/rechunk:v0.5.0
210
153
211
154
- name : Get source versions
212
155
id : labels
@@ -231,6 +174,38 @@ jobs:
231
174
exit 1
232
175
fi
233
176
echo "KERNEL_VERSION=$linux" >> $GITHUB_ENV
177
+
178
+ # Generate a primary version key that appears
179
+ # in KDE, rpm-ostree status, and github.
180
+ - name : Generate Version
181
+ id : generate-version
182
+ shell : bash
183
+ run : |
184
+ # Generate the primary version key that will be stored on os-release,
185
+ # shown on the bootloader, and used for the image tag.
186
+ UPSTREAM_TAG="${{ env.SOURCE_IMAGE_VERSION }}"
187
+ FEDORA_VERSION="${{ matrix.fedora_version }}"
188
+ BAZZITE_VERSION="${{ matrix.bazzite_version }}"
189
+ SHA_SHORT="${GITHUB_SHA::7}"
190
+
191
+ if [ -n "${{ github.event.pull_request.number }}" ]; then
192
+ VERSION="pr-${FEDORA_VERSION}-${{ github.event.pull_request.number }}"
193
+ PRETTY_VERSION="PR (${{ github.event.pull_request.number }}, ${UPSTREAM_TAG})"
194
+ elif [[ ${{ github.ref_name }} == "unstable" ]]; then
195
+ VERSION="unstable-${SHA_SHORT}"
196
+ PRETTY_VERSION="Unstable (#${SHA_SHORT}, F${UPSTREAM_TAG})"
197
+ elif [[ ${{ github.ref_name }} == "testing" ]]; then
198
+ VERSION="testing-${BAZZITE_VERSION}-${UPSTREAM_TAG}"
199
+ PRETTY_VERSION="Testing (${BAZZITE_VERSION}, F${UPSTREAM_TAG})"
200
+ else
201
+ VERSION="${BAZZITE_VERSION}-${UPSTREAM_TAG}"
202
+ PRETTY_VERSION="Stable (${BAZZITE_VERSION}, F${UPSTREAM_TAG})"
203
+ fi
204
+ echo "tag=${VERSION}" >> $GITHUB_OUTPUT
205
+ echo "pretty=${PRETTY_VERSION}" >> $GITHUB_OUTPUT
206
+
207
+ echo "Generated the following:"
208
+ cat $GITHUB_OUTPUT
234
209
235
210
# Build image using buildah and save it to raw-img
236
211
- name : Build Image
@@ -247,6 +222,8 @@ jobs:
247
222
--build-arg KERNEL_FLAVOR=${{ matrix.kernel_flavor }} \
248
223
--build-arg IMAGE_BRANCH=${{ github.ref_name }} \
249
224
--build-arg SHA_HEAD_SHORT=${{ env.SHA_HEAD_SHORT }} \
225
+ --build-arg VERSION_TAG=${{ steps.generate-version.outputs.tag }} \
226
+ --build-arg VERSION_PRETTY="${{ steps.generate-version.outputs.pretty }}" \
250
227
--tag raw-img .
251
228
252
229
- name : Remove auxiliary images
@@ -259,12 +236,12 @@ jobs:
259
236
# Reprocess raw-img using rechunker which will delete it
260
237
- name : Run Rechunker
261
238
id : rechunk
262
- uses : hhd-dev/rechunk@v0.2.1
239
+ uses : hhd-dev/rechunk@v0.5.0
263
240
with :
264
- rechunk : ' ghcr.io/hhd-dev/rechunk:v0.2.1 '
241
+ rechunk : ' ghcr.io/hhd-dev/rechunk:v0.5.0 '
265
242
ref : ' raw-img'
266
243
prev-ref : ${{ github.event.inputs.fresh-rechunk == 'true' && '' || 'ghcr.io/ublue-os/bazzite:unstable' }}
267
- version : ' ${{ env.SOURCE_IMAGE_VERSION }}'
244
+ version : ' ${{ steps.generate-version.outputs.tag }}'
268
245
labels : |
269
246
io.artifacthub.package.logo-url=https://raw.githubusercontent.com/ublue-os/bazzite/main/repo_content/logo.png
270
247
io.artifacthub.package.readme-url=https://bazzite.gg/
@@ -276,6 +253,85 @@ jobs:
276
253
org.opencontainers.image.title=bazzite
277
254
org.opencontainers.image.url=https://github.com/ublue-os/bazzite
278
255
256
+ org.universal-blue.pkg.kernel=<relver:kernel>
257
+ org.universal-blue.pkg.gamescope=<relver:gamescope>
258
+ ${{ matrix.base_image_name == "kinoite" && "org.universal-blue.pkg.kwayland=<version:kwayland>" || "" }}
259
+ ${{ matrix.base_name == "bazzite-deck" && "org.universal-blue.pkg.hhd=<version:hhd>" || "" }}
260
+ ${{ matrix.base_name == "bazzite-deck" && "org.universal-blue.pkg.hhd=<version:adjustor>" || "" }}
261
+ ${{ matrix.base_name == "bazzite-deck" && "org.universal-blue.pkg.hhd=<version:hhd-ui>" || "" }}
262
+
263
+ org.universal-blue.info=<imginfo>
264
+
265
+ # Generate tags after rechunker runs and checks the primary tag is not duplicated
266
+ # If it is, rechunk will suffix it by .1, .2, etc and put it in steps.rechunk.outputs.version
267
+ - name : Generate tags
268
+ id : generate-tags
269
+ shell : bash
270
+ run : |
271
+ # Common vars for generating tags
272
+ VERSION_TAG="${{ steps.rechunk.outputs.version }}"
273
+ UPSTREAM_TAG="${{ env.SOURCE_IMAGE_VERSION }}"
274
+ FEDORA_VERSION="${{ matrix.fedora_version }}"
275
+ BAZZITE_VERSION="${{ matrix.bazzite_version }}"
276
+ SHA_SHORT="${GITHUB_SHA::7}"
277
+ BUILD_TAGS=( "${VERSION_TAG}" )
278
+
279
+ # Use latest var to check if we should tag as latest
280
+ unset LATEST
281
+ if [[ "${{ matrix.is_latest_version }}" == "true" ]] && \
282
+ [[ "${{ matrix.is_stable_version }}" == "true" ]]; then
283
+ LATEST="1"
284
+ fi
285
+
286
+ if [[ "${{ github.event_name }}" == "pull_request" ]]; then
287
+ # Track latest ver per PR
288
+ if [ -n "$LATEST" ]; then
289
+ BUILD_TAGS+=("pr-${{ github.event.pull_request.number }}")
290
+ fi
291
+ elif [[ ${{ github.ref_name }} == "unstable" ]]; then
292
+ # Per fedora version
293
+ BUILD_TAGS+=("${FEDORA_VERSION}-unstable")
294
+ BUILD_TAGS+=("unstable-${FEDORA_VERSION}") # flip ver to be last
295
+
296
+ # Per upstream ver
297
+ BUILD_TAGS+=("unstable-${UPSTREAM_TAG}")
298
+
299
+ if [ -n "$LATEST" ]; then
300
+ BUILD_TAGS+=("unstable")
301
+ fi
302
+ elif [[ ${{ github.ref_name }} == "testing" ]]; then
303
+ # Per fedora version
304
+ BUILD_TAGS+=("${FEDORA_VERSION}-testing")
305
+ BUILD_TAGS+=("testing-${FEDORA_VERSION}") # flip ver to be last
306
+
307
+ # Per upstream ver
308
+ BUILD_TAGS+=("testing-${UPSTREAM_TAG}")
309
+
310
+ if [ -n "$LATEST" ]; then
311
+ BUILD_TAGS+=("testing-${BAZZITE_VERSION}")
312
+ BUILD_TAGS+=("testing")
313
+ fi
314
+ else
315
+ BUILD_TAGS+=("${FEDORA_VERSION}")
316
+ BUILD_TAGS+=("${UPSTREAM_TAG}")
317
+ BUILD_TAGS+=("${BAZZITE_VERSION}")
318
+ BUILD_TAGS+=("stable-${UPSTREAM_TAG}")
319
+
320
+ # Per fedora version
321
+ BUILD_TAGS+=("${FEDORA_VERSION}-stable")
322
+ BUILD_TAGS+=("stable-${FEDORA_VERSION}") # flip ver to be last
323
+
324
+ if [ -n "$LATEST" ]; then
325
+ BUILD_TAGS+=("latest" "stable")
326
+ fi
327
+ fi
328
+
329
+ echo "Generated the following build tags: "
330
+ for TAG in "${BUILD_TAGS[@]}"; do
331
+ echo "${TAG}"
332
+ done
333
+ echo "alias_tags=${BUILD_TAGS[*]}" >> $GITHUB_OUTPUT
334
+
279
335
# Pull oci-dir image, remove oci dir to make space, and then tag appropriately
280
336
- name : Load in podman and tag
281
337
run : |
0 commit comments