2025-03-24 05:13:17 -08:00
|
|
|
name: Titanoboa LiveCD ISO builder
|
|
|
|
|
description: >-
|
|
|
|
|
Create LiveCDs of a bootc container image.
|
|
|
|
|
The resulting iso will be placed at `output.iso`.
|
|
|
|
|
inputs:
|
|
|
|
|
image-ref:
|
2026-05-19 06:48:30 -08:00
|
|
|
description: Reference to the bootc container image to build the ISO from.
|
2025-03-24 05:13:17 -08:00
|
|
|
required: true
|
|
|
|
|
iso-dest:
|
|
|
|
|
description: Where the iso will be placed
|
|
|
|
|
required: false
|
|
|
|
|
default: ${{ github.workspace }}/output.iso
|
|
|
|
|
outputs:
|
|
|
|
|
iso-dest:
|
|
|
|
|
description: Where the iso was be placed
|
|
|
|
|
value: ${{ steps.generate-iso.outputs.iso_dest }}
|
|
|
|
|
|
|
|
|
|
runs:
|
|
|
|
|
using: composite
|
|
|
|
|
steps:
|
|
|
|
|
- name: Generate iso
|
|
|
|
|
id: generate-iso
|
2025-03-25 04:38:11 -08:00
|
|
|
env:
|
|
|
|
|
DESTINATION_PATH: ${{ inputs.iso-dest }}
|
2026-05-19 06:48:30 -08:00
|
|
|
TITANOBOA_CTR_IMAGE: ${{ inputs.image-ref }}
|
2025-03-24 05:13:17 -08:00
|
|
|
shell: bash
|
|
|
|
|
run: |
|
|
|
|
|
set -euxo pipefail
|
2026-05-19 06:48:30 -08:00
|
|
|
cd "$GITHUB_ACTION_PATH" || exit 1
|
2025-03-25 04:38:11 -08:00
|
|
|
|
2026-05-19 06:48:30 -08:00
|
|
|
# Build ISO
|
|
|
|
|
ISO_FILENAME="$(env TITANOBOA_CTR_IMAGE="$TITANOBOA_CTR_IMAGE" "$GITHUB_ACTION_PATH"/main.sh)"
|
2025-03-25 05:51:26 -08:00
|
|
|
|
2025-03-24 05:13:17 -08:00
|
|
|
# Fix iso file permisions
|
2026-05-19 06:48:30 -08:00
|
|
|
sudo chown $(id -u):$(id -g) "$ISO_FILENAME"
|
2025-03-25 04:38:11 -08:00
|
|
|
|
2025-03-24 05:13:17 -08:00
|
|
|
# Move iso to iso-dest
|
2026-05-19 06:48:30 -08:00
|
|
|
dest="$(realpath --relative-base="${GITHUB_WORKSPACE}" "${DESTINATION_PATH}")"
|
|
|
|
|
dest="$(realpath -m $dest)"
|
|
|
|
|
mkdir -p "$(dirname "$dest")"
|
|
|
|
|
mv "$ISO_FILENAME" "$dest"
|
2025-03-24 05:13:17 -08:00
|
|
|
echo "iso_dest=$dest" >> "$GITHUB_OUTPUT"
|
2025-03-25 05:51:26 -08:00
|
|
|
|
2025-03-24 05:13:17 -08:00
|
|
|
- name: Check the iso is there
|
|
|
|
|
shell: bash
|
|
|
|
|
env:
|
|
|
|
|
DEST_ISO: ${{ steps.generate-iso.outputs.iso_dest }}
|
|
|
|
|
run: |
|
|
|
|
|
[[ -f "${DEST_ISO}" ]] || {
|
2026-05-19 06:48:30 -08:00
|
|
|
echo "::error:Iso file does not exist at ${DEST_ISO}"
|
2025-03-24 05:13:17 -08:00
|
|
|
exit 1
|
|
|
|
|
}
|