Wed 25 Dec 2024 22:56:00 NZDT #14
This file contains 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
name: Build ISO | |
env: | |
IMAGE_REGISTRY: ghcr.io/yardquit | |
IMAGE_NAME: apprendo | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}-${{ inputs.image_flavor }}.iso | |
cancel-in-progress: true | |
jobs: | |
build-iso: | |
name: Build ${{ inputs.image_flavor }} ISOs (${{ matrix.image }}) | |
outputs: | |
url: ${{ steps.url.outputs.url }} | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
id-token: write | |
strategy: | |
fail-fast: false | |
matrix: | |
image: ["${{ fromJson(inputs.images) }}"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Just | |
shell: bash | |
run: | | |
set -eoux pipefail | |
JUST_VERSION=$(curl -L https://api.github.com/repos/casey/just/releases/latest | jq -r '.tag_name') | |
curl -sSLO https://github.com/casey/just/releases/download/${JUST_VERSION}/just-${JUST_VERSION}-x86_64-unknown-linux-musl.tar.gz | |
tar -zxvf just-${JUST_VERSION}-x86_64-unknown-linux-musl.tar.gz -C /tmp just | |
sudo mv /tmp/just /usr/local/bin/just | |
rm -f just-${JUST_VERSION}-x86_64-unknown-linux-musl.tar.gz | |
- name: Check Just Syntax | |
shell: bash | |
run: | | |
just check | |
- name: Maximize Build Space | |
if: contains(fromJson('["workflow_dispatch", "workflow_call"]'), github.event_name) || github.event.schedule == '41 6 * * 0' | |
uses: ublue-os/remove-unwanted-software@v7 | |
- name: Build ISO | |
if: contains(fromJson('["workflow_dispatch", "workflow_call"]'), github.event_name) || github.event.schedule == '41 6 * * 0' | |
shell: bash | |
run: | | |
sudo just build-iso ${{ matrix.image }} 1 1 | |
tree "./${{ env.IMAGE_NAME }}_build/output/" | |
- name: Upload ISOs and Checksum to Job Artifacts | |
id: upload | |
uses: actions/upload-artifact@v4 | |
if: contains(fromJson('["workflow_dispatch", "workflow_call"]'), github.event_name) || github.event.schedule == '41 6 * * 0' | |
with: | |
name: ${{ matrix.image }}-iso | |
path: | | |
./${{ env.IMAGE_NAME }}_build/output/ | |
if-no-files-found: warn | |
retention-days: 0 | |
compression-level: 0 | |
overwrite: true | |
- name: Make URL Artifact | |
shell: bash | |
id: url | |
run: | | |
echo "|[${{ matrix.image }}](${{ steps.upload.outputs.artifact-url }})|" > url-${upload}-${{ matrix.image }}.txt | |
echo "url=${upload}" >> $GITHUB_OUTPUT | |
- name: Upload ISO URL for Changelogs | |
id: upload-url | |
uses: actions/upload-artifact@v4 | |
with: | |
name: url-${{ steps.url.outputs.url }}-${{ matrix.image }} | |
path: | |
url-${{ steps.url.outputs.url }}-${{ matrix.image }}.txt | |
if-no-files-found: error | |
retention-days: 0 | |
compression-level: 0 | |
overwrite: true | |
changelogs: | |
name: ${{ inputs.image_flavor }} Changelogs | |
uses: ./.github/workflows/changelogs.yml | |
secrets: inherit | |
needs: build-iso | |
with: | |
target: ${{ needs.build-iso.outputs.url }} |