From 58e29223b48f421508fd2c8b5dfb46d826ec8bd8 Mon Sep 17 00:00:00 2001 From: humocs-man <251756307+humocs-man@users.noreply.github.com> Date: Sun, 17 May 2026 13:34:54 +0200 Subject: [PATCH] Refactor build.yml for Chunkah and image handling Removed invalid 'image-archive' argument and adjusted annotations for Chunkah run. --- .github/workflows/build.yml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4f2a2bb..c885eb4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -107,7 +107,7 @@ jobs: # Das kritische ostree-Label explizit auslesen, falls vorhanden OSTREE_DIFFID=$(podman inspect $BASE_IMAGE --format '{{index .Config.Labels "ostree.final-diffid"}}' 2>/dev/null || echo "") - # Chunkah-Lauf: Annotation explizit übergeben, falls vorhanden + # Chunkah-Lauf: Annotation explizit übergeben ANNOTATION_ARG="" if [ ! -z "$OSTREE_DIFFID" ]; then ANNOTATION_ARG="--annotation ostree.final-diffid=$OSTREE_DIFFID" @@ -127,6 +127,24 @@ jobs: --output /outputs/image.ociarchive \ --rootfs /inputs + # WIEDER EINGEFÜGT: Das OCI-Archiv in Podman laden, damit die Action es findet + podman rmi $BASE_IMAGE || true + podman load -i ./chunkah-out/image.ociarchive + + # Image sauber taggen + IMAGE_ID=$(podman images --filter "dangling=true" --format "{{.ID}}" | head -n 1) + if [ -z "$IMAGE_ID" ]; then + IMAGE_ID=$(podman images --format "{{.ID}} {{.Repository}}" | grep -v "chunkah" | head -n 1 | awk '{print $1}') + fi + podman tag $IMAGE_ID $BASE_IMAGE + + # WIEDER EINGEFÜGT: Die restlichen Tags für Datum, etc. lokal erzeugen + - name: Tag for registry + run: | + for tag in ${{ steps.metadata.outputs.tags }}; do + podman tag ${{ env.IMAGE_NAME }}:${{ env.DEFAULT_TAG }} ${{ env.IMAGE_NAME }}:$tag + done + - name: Login to GitHub Container Registry uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v3 if: github.event_name != 'pull_request' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch) @@ -148,7 +166,7 @@ jobs: tags: ${{ steps.metadata.outputs.tags }} username: ${{ env.REGISTRY_USER }} password: ${{ env.REGISTRY_PASSWORD }} - image-archive: ./chunkah-out/image.ociarchive + # KORREKTUR: "image-archive" entfernt, da ungültig. extra-args: --compression-format=zstd --compression-level=5 - name: Install Cosign