From a70abab8dc7660e0db89721caaee0446b273135c Mon Sep 17 00:00:00 2001 From: David Mays Date: Tue, 2 Apr 2024 14:41:15 +0100 Subject: [PATCH] Work-around the JSON formatting issue --- .github/workflows/build-multiarch.yaml | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build-multiarch.yaml b/.github/workflows/build-multiarch.yaml index c1e3b52..baab950 100644 --- a/.github/workflows/build-multiarch.yaml +++ b/.github/workflows/build-multiarch.yaml @@ -228,6 +228,12 @@ jobs: type=sha,enable=true,prefix=${{ join(matrix.version.rubyver, '.') }}-,format=short type=sha,enable=true,priority=100,format=long,prefix=${{ join(matrix.version.rubyver, '.') }}- + - name: Create Manifest Lists (for Base) + working-directory: /tmp/digests/base + run: | + docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ + $(printf '${{ env.REGISTRY_BASE }}/govuk-ruby-base@sha256:%s ' *) + - name: Generate Builder Image Metadata uses: docker/metadata-action@v5 id: builder-image-metadata @@ -250,26 +256,10 @@ jobs: type=sha,enable=true,prefix=${{ join(matrix.version.rubyver, '.') }}-,format=short type=sha,enable=true,priority=100,format=long,prefix=${{ join(matrix.version.rubyver, '.') }}- - - name: Debug - Step Output - run: | - echo "Github steps.base-image-metadata.outputs.json output:" - echo ${{ steps.base-image-metadata.outputs.json }} - echo "========" - echo "DOCKER_METADATA_OUTPUT_JSON Env Var Output:" - echo $DOCKER_METADATA_OUTPUT_JSON - - - name: Create Manifest Lists (for Base) - working-directory: /tmp/digests/base - run: | - docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "${{ steps.base-image-metadata.outputs.json }}") \ - $(printf '${{ env.REGISTRY_BASE }}/govuk-ruby-base@sha256:%s ' *) - docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "${{ steps.builder-image-metadata.outputs.json }}") \ - $(printf '${{ env.REGISTRY_BASE }}/govuk-ruby-builder@sha256:%s ' *) - - name: Create Manifest Lists (for Builder) working-directory: /tmp/digests/builder run: | - docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "${{ steps.builder-image-metadata.outputs.json }}") \ + docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ $(printf '${{ env.REGISTRY_BASE }}/govuk-ruby-builder@sha256:%s ' *) - name: Inspect Images