This repository was archived by the owner on Oct 21, 2025. It is now read-only.
Build Live ISOs (Testing) #9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json | |
| name: Build Live ISOs (Testing) | |
| on: | |
| workflow_dispatch: | |
| workflow_call: | |
| env: | |
| IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }} | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref || github.run_id }}-iso | |
| cancel-in-progress: true | |
| jobs: | |
| build-iso: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| id-token: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| image_name: | |
| - cosmium | |
| - cosmium-deck | |
| steps: | |
| - name: Free Disk Space (Ubuntu) | |
| uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 | |
| - name: Checkout Repo | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 | |
| - name: Set Image Tag | |
| id: generate-tag | |
| shell: bash | |
| run: | | |
| TAG="testing" | |
| echo "tag=${TAG}" >> $GITHUB_OUTPUT | |
| - name: Set Flatpaks Directory Shortname | |
| id: generate-flatpak-dir-shortname | |
| shell: bash | |
| run: | | |
| FLATPAK_DIR_SHORTNAME="installer" | |
| echo "flatpak-dir-shortname=$(realpath ${FLATPAK_DIR_SHORTNAME})" >> $GITHUB_OUTPUT | |
| # Docker requires lowercase registry references | |
| - name: Lowercase Registry | |
| id: registry_case | |
| uses: ASzc/change-string-case-action@d0603cd0a7dd490be678164909f65c7737470a7f # v6 | |
| with: | |
| string: ${{ env.IMAGE_REGISTRY }} | |
| # We need this as we use the desktop image as the runtime for | |
| # the livecds. | |
| - name: Obtain non-deck image ref | |
| id: get-nondeck-ref | |
| run: | | |
| ref="${{ matrix.image_name }}" | |
| ref="${ref/-deck/}" | |
| echo "ref=${ref}" >> $GITHUB_OUTPUT | |
| - name: Build ISOs | |
| uses: ublue-os/titanoboa@main | |
| id: build | |
| with: | |
| image-ref: ${{ steps.registry_case.outputs.lowercase }}/${{ steps.get-nondeck-ref.outputs.ref }}:${{ steps.generate-tag.outputs.tag }} | |
| container-image: ${{ steps.registry_case.outputs.lowercase }}/${{ matrix.image_name }}:${{ steps.generate-tag.outputs.tag }} | |
| iso-dest: ${{ matrix.image_name }}-${{ steps.generate-tag.outputs.tag }}-live.iso | |
| flatpaks-list: ${{ steps.generate-flatpak-dir-shortname.outputs.flatpak-dir-shortname }}/flatpaks | |
| hook-pre-initramfs: ${{ github.workspace }}/installer/titanoboa_hook_preinitramfs.sh | |
| hook-post-rootfs: ${{ github.workspace }}/installer/titanoboa_hook_postrootfs.sh | |
| - name: Move ISOs to Upload Directory | |
| id: upload-directory | |
| shell: bash | |
| run: | | |
| ISO_UPLOAD_DIR=${{ github.workspace }}/upload | |
| DEST=${ISO_UPLOAD_DIR}/$(basename ${{ steps.build.outputs.iso-dest }}) | |
| mkdir -p ${ISO_UPLOAD_DIR} | |
| mv ${{ steps.build.outputs.iso-dest }} ${DEST} | |
| sha256sum ${DEST} > ${DEST}-CHECKSUM | |
| echo "iso-upload-dir=${ISO_UPLOAD_DIR}" >> $GITHUB_OUTPUT | |
| - name: Upload ISOs and Checksum to Job Artifacts | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | |
| with: | |
| name: ${{ matrix.image_name }}-${{ steps.generate-tag.outputs.tag }}-${{ matrix.major_version}} | |
| path: ${{ steps.upload-directory.outputs.iso-upload-dir }} | |
| if-no-files-found: error | |
| retention-days: 0 | |
| compression-level: 0 | |
| overwrite: true |