Skip to content

Commit 3e41ff3

Browse files
committed
titanoboa
1 parent 39be3c7 commit 3e41ff3

File tree

2 files changed

+19
-29
lines changed

2 files changed

+19
-29
lines changed

.github/workflows/build-disk.yml

Lines changed: 16 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ on:
1717
env:
1818
IMAGE_NAME: ${{ github.event.repository.name }}
1919
IMAGE_REGISTRY: "ghcr.io/${{ github.repository_owner }}"
20-
DEFAULT_TAG: "latest"
21-
BIB_IMAGE: "quay.io/centos-bootc/bootc-image-builder:latest"
2220

2321
concurrency:
2422
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
@@ -27,17 +25,15 @@ concurrency:
2725
jobs:
2826
build:
2927
name: Build ISO (${{ matrix.variant.name }})
30-
runs-on: ubuntu-latest-m
28+
runs-on: ubuntu-24.04
3129
strategy:
3230
fail-fast: false
3331
matrix:
3432
variant:
3533
- name: "regular"
3634
tag: "latest"
37-
config: "./disk_config/iso-regular.toml"
3835
- name: "nvidia"
3936
tag: "latest-nvidia"
40-
config: "./disk_config/iso-nvidia.toml"
4137
permissions:
4238
contents: write
4339
packages: read
@@ -46,47 +42,39 @@ jobs:
4642
steps:
4743
- name: Prepare environment
4844
run: |
49-
USER_UID=$(id -u)
50-
USER_GID=$(id -g)
5145
echo "IMAGE_REGISTRY=${IMAGE_REGISTRY,,}" >> ${GITHUB_ENV}
5246
echo "IMAGE_NAME=${IMAGE_NAME,,}" >> ${GITHUB_ENV}
53-
echo "USER_UID=${USER_UID}" >> ${GITHUB_ENV}
54-
echo "USER_GID=${USER_GID}" >> ${GITHUB_ENV}
5547
5648
- name: Maximize build space
57-
uses: ublue-os/remove-unwanted-software@cc0becac701cf642c8f0a6613bbdaf5dc36b259e # v9
58-
with:
59-
remove-codeql: true
49+
uses: ublue-os/remove-unwanted-software@695eb75bc387dbcd9685a8e72d23439d8686cba6 # v10
6050

6151
- name: Checkout
6252
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
6353

6454
- name: Build ISO
6555
id: build
66-
uses: osbuild/bootc-image-builder-action@main
56+
uses: ublue-os/titanoboa@main
6757
with:
68-
builder-image: ${{ env.BIB_IMAGE }}
69-
config-file: ${{ matrix.variant.config }}
70-
image: ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ matrix.variant.tag }}
71-
chown: ${{ env.USER_UID }}:${{ env.USER_GID }}
72-
types: anaconda-iso
73-
additional-args: --use-librepo=True
58+
image-ref: ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ matrix.variant.tag }}
59+
iso-dest: ${{ github.workspace }}/output.iso
60+
builder-distro: fedora
7461

75-
- name: Rename ISO for release
62+
- name: Rename ISO and generate checksum
7663
id: rename
7764
run: |
78-
ISO_DIR="${{ steps.build.outputs.output-directory }}"
79-
ORIGINAL_ISO=$(find "$ISO_DIR" -name "*.iso" -type f | head -1)
65+
set -x
66+
mkdir -p output
8067
NEW_NAME="${{ env.IMAGE_NAME }}-${{ matrix.variant.name }}.iso"
81-
mv "$ORIGINAL_ISO" "$ISO_DIR/$NEW_NAME"
82-
echo "iso-path=$ISO_DIR/$NEW_NAME" >> $GITHUB_OUTPUT
68+
mv "${{ steps.build.outputs.iso-dest }}" "output/$NEW_NAME"
69+
(cd output && sha256sum "$NEW_NAME" | tee "$NEW_NAME.sha256")
70+
echo "iso-path=output/$NEW_NAME" >> $GITHUB_OUTPUT
8371
echo "iso-name=$NEW_NAME" >> $GITHUB_OUTPUT
8472
8573
- name: Upload ISO as artifact
8674
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
8775
with:
8876
name: ${{ env.IMAGE_NAME }}-${{ matrix.variant.name }}-iso
89-
path: ${{ steps.build.outputs.output-directory }}
77+
path: output/
9078
if-no-files-found: error
9179
retention-days: 7
9280
compression-level: 0
@@ -96,6 +84,8 @@ jobs:
9684
uses: softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda # v2
9785
with:
9886
tag_name: ${{ inputs.release-tag }}
99-
files: ${{ steps.rename.outputs.iso-path }}
87+
files: |
88+
output/${{ steps.rename.outputs.iso-name }}
89+
output/${{ steps.rename.outputs.iso-name }}.sha256
10090
fail_on_unmatched_files: true
10191
generate_release_notes: true

Justfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ build-raw $target_image=("localhost/" + image_name) $tag=default_tag: && (_build
231231

232232
# Build an ISO installer image
233233
[group('Build Virtal Machine Image')]
234-
build-iso $target_image=("localhost/" + image_name) $tag=default_tag: && (_build-bib target_image tag "anaconda-iso" "disk_config/iso-gnome.toml")
234+
build-iso $target_image=("localhost/" + image_name) $tag=default_tag: && (_build-bib target_image tag "anaconda-iso" "disk_config/iso-regular.toml")
235235

236236
# Build an ISO installer image (NVIDIA variant)
237237
[group('Build Virtal Machine Image')]
@@ -247,7 +247,7 @@ rebuild-raw $target_image=("localhost/" + image_name) $tag=default_tag: && (_reb
247247

248248
# Rebuild an ISO installer image
249249
[group('Build Virtal Machine Image')]
250-
rebuild-iso $target_image=("localhost/" + image_name) $tag=default_tag: && (_rebuild-bib target_image tag "anaconda-iso" "disk_config/iso-gnome.toml")
250+
rebuild-iso $target_image=("localhost/" + image_name) $tag=default_tag: && (_rebuild-bib target_image tag "anaconda-iso" "disk_config/iso-regular.toml")
251251

252252
# Rebuild an ISO installer image (NVIDIA variant)
253253
[group('Build Virtal Machine Image')]
@@ -305,7 +305,7 @@ run-vm-raw $target_image=("localhost/" + image_name) $tag=default_tag: && (_run-
305305

306306
# Run a virtual machine from an ISO
307307
[group('Run Virtal Machine')]
308-
run-vm-iso $target_image=("localhost/" + image_name) $tag=default_tag: && (_run-vm target_image tag "anaconda-iso" "disk_config/iso-gnome.toml")
308+
run-vm-iso $target_image=("localhost/" + image_name) $tag=default_tag: && (_run-vm target_image tag "anaconda-iso" "disk_config/iso-regular.toml")
309309

310310
# Run a virtual machine using systemd-vmspawn
311311
[group('Run Virtal Machine')]

0 commit comments

Comments
 (0)