From 5c9f0f403a907c4dbaf1362029885300937c9df0 Mon Sep 17 00:00:00 2001 From: Jo Date: Tue, 25 Feb 2025 17:18:06 +0100 Subject: [PATCH] fix push step --- .github/workflows/builder-image.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/builder-image.yml b/.github/workflows/builder-image.yml index 76762742..48468202 100644 --- a/.github/workflows/builder-image.yml +++ b/.github/workflows/builder-image.yml @@ -129,12 +129,15 @@ jobs: echo -n "${{ env.REGISTRY_IMAGE }}@$(cat $file) " done) - # Create the manifest list with the collected tags and digests + # Create the manifest list with the collected tags and digests for Docker Hub docker buildx imagetools create $TAGS $DIGESTS - # Push to GitHub Container Registry - GHCR_TAGS=$(echo '${{ steps.meta.outputs.tags }}' | sed 's|^|ghcr.io/${{ env.REGISTRY_IMAGE }}:|g' | xargs -I {} echo "-t {}") - docker buildx imagetools create $GHCR_TAGS $DIGESTS + # For GitHub Container Registry, process each tag individually + for tag in $(echo '${{ steps.meta.outputs.tags }}' | grep -o '[^[:space:]]*$'); do + ghcr_tag="ghcr.io/${{ env.REGISTRY_IMAGE }}:$tag" + echo "Creating manifest for $ghcr_tag" + docker buildx imagetools create -t $ghcr_tag $DIGESTS + done - name: Inspect image run: |