Update reusable-build-iso-anaconda.yml
This commit is contained in:
@@ -1,14 +1,8 @@
|
||||
name: Reusable Build
|
||||
|
||||
name: Reusable Build ISO
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
image_version:
|
||||
description: 'Which image version to build'
|
||||
type: string
|
||||
required: true
|
||||
image_tag:
|
||||
description: 'Image tag to build from'
|
||||
type: string
|
||||
default: stable
|
||||
upload_artifacts:
|
||||
@@ -17,78 +11,53 @@ on:
|
||||
upload_r2:
|
||||
type: boolean
|
||||
default: true
|
||||
|
||||
env:
|
||||
IMAGE_REGISTRY: "ghcr.io/humocs-man"
|
||||
IMAGE_NAME: "fluffy-pancake"
|
||||
secrets:
|
||||
R2_ACCESS_KEY_ID_2025:
|
||||
required: false
|
||||
R2_SECRET_ACCESS_KEY_2025:
|
||||
required: false
|
||||
R2_ENDPOINT_2025:
|
||||
required: false
|
||||
|
||||
jobs:
|
||||
determine-matrix:
|
||||
name: Determine Build Matrix
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
||||
steps:
|
||||
- id: set-matrix
|
||||
run: |
|
||||
matrix='{"include":[
|
||||
{"platform":"amd64","flavor":"cosmic","image_version":"stable"}
|
||||
]}'
|
||||
echo "matrix=$(echo "$matrix" | jq -c .)" >> $GITHUB_OUTPUT
|
||||
|
||||
build:
|
||||
name: Build COSMIC Live ISO
|
||||
name: Build ISO
|
||||
runs-on: ubuntu-24.04
|
||||
needs: determine-matrix
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix: ${{ fromJSON(needs.determine-matrix.outputs.matrix) }}
|
||||
permissions:
|
||||
contents: read
|
||||
packages: read
|
||||
id-token: write
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- uses: extractions/setup-just@v3
|
||||
|
||||
- name: Format image ref
|
||||
id: image_ref
|
||||
- name: Create empty flatpak list
|
||||
id: flatpaks
|
||||
run: |
|
||||
set -eoux pipefail
|
||||
image_name="${IMAGE_NAME}"
|
||||
image_ref="${IMAGE_REGISTRY}/${image_name}"
|
||||
artifact_format="${image_name}-${{ matrix.image_version }}-cosmic-$(uname -m)"
|
||||
echo "image_ref=$image_ref" >> $GITHUB_OUTPUT
|
||||
echo "artifact_format=$artifact_format" >> $GITHUB_OUTPUT
|
||||
echo "kargs=NONE" >> $GITHUB_OUTPUT
|
||||
FILE="$(mktemp)"
|
||||
: > "$FILE"
|
||||
echo "file=$FILE" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Build ISO
|
||||
id: build
|
||||
uses: ublue-os/titanoboa@main
|
||||
with:
|
||||
image-ref: ${{ steps.image_ref.outputs.image_ref }}:${{ inputs.image_tag }}
|
||||
hook-post-rootfs: ${{ github.workspace }}/iso/enable_anaconda.sh
|
||||
kargs: ${{ steps.image_ref.outputs.kargs }}
|
||||
image-ref: ghcr.io/humocs-man/fluffy-pancake:${{ inputs.image_tag }}
|
||||
flatpaks-list: ${{ steps.flatpaks.outputs.file }}
|
||||
hook-post-rootfs: ${{ github.workspace }}/iso_files/configure_iso_anaconda.sh
|
||||
kargs: NONE
|
||||
builder-distro: fedora
|
||||
|
||||
- name: Rename ISO
|
||||
id: rename
|
||||
env:
|
||||
OUTPUT_PATH: ${{ steps.build.outputs.iso-dest }}
|
||||
OUTPUT_NAME: ${{ steps.image_ref.outputs.artifact_format }}
|
||||
run: |
|
||||
mkdir -p output
|
||||
mv "$OUTPUT_PATH" "output/${OUTPUT_NAME}.iso"
|
||||
sha256sum "output/${OUTPUT_NAME}.iso" > "output/${OUTPUT_NAME}.iso-CHECKSUM"
|
||||
echo "output_directory=$(realpath output)" >> $GITHUB_OUTPUT
|
||||
mv "${{ steps.build.outputs.iso-dest }}" output/fluffy-pancake-${{ inputs.image_tag }}.iso
|
||||
sha256sum output/*.iso | tee output/CHECKSUMS
|
||||
|
||||
- name: Upload ISO Artifact
|
||||
- name: Upload Artifacts
|
||||
if: inputs.upload_artifacts
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: ${{ steps.image_ref.outputs.artifact_format }}
|
||||
path: ${{ steps.rename.outputs.output_directory }}
|
||||
name: fluffy-pancake-iso
|
||||
path: output
|
||||
|
||||
Reference in New Issue
Block a user