From 2cea6041f9367282b5ff4c60ee95f6f7dcbfe373 Mon Sep 17 00:00:00 2001 From: David Mays Date: Wed, 13 Mar 2024 17:15:37 +0000 Subject: [PATCH 01/14] Test removing the tags from the first stage... ...they should be added later. --- .github/workflows/build-multiarch.yaml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.github/workflows/build-multiarch.yaml b/.github/workflows/build-multiarch.yaml index 9d087bf..3bf7523 100644 --- a/.github/workflows/build-multiarch.yaml +++ b/.github/workflows/build-multiarch.yaml @@ -88,11 +88,6 @@ jobs: org.opencontainers.image.version=${{ join(matrix.version.rubyver, '.') }} org.opencontainers.image.created=${{ steps.calculate-image-tags.outputs.createdDate }} org.opencontainers.image.vendor=GDS - tags: | - type=semver,pattern={{raw}},value=${{ join(matrix.version.rubyver, '.') }} - type=raw,value=latest,enable=${{ matrix.version.extra == 'latest' }} - 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: Generate Builder Image Metadata uses: docker/metadata-action@v5 @@ -110,11 +105,6 @@ jobs: org.opencontainers.image.version=${{ join(matrix.version.rubyver, '.') }} org.opencontainers.image.created=${{ steps.calculate-image-tags.outputs.createdDate }} org.opencontainers.image.vendor=GDS - tags: | - type=semver,pattern={{raw}}value=${{ join(matrix.version.rubyver, '.') }} - type=raw,value=latest,enable=${{ matrix.version.extra == 'latest' }} - type=sha,enable=true,prefix=${{ join(matrix.version.rubyver, '.') }}-,format=short - type=sha,enable=true,priority=100,format=long,prefix=${{ join(matrix.version.rubyver, '.') }}- - id: build-base-image uses: docker/build-push-action@v5 From 0dd77078c9b1f4f7b59ec2e5126a2d716a006c4e Mon Sep 17 00:00:00 2001 From: David Mays Date: Thu, 14 Mar 2024 11:15:16 +0000 Subject: [PATCH 02/14] Set Push to false (this is default) --- .github/workflows/build-multiarch.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-multiarch.yaml b/.github/workflows/build-multiarch.yaml index 3bf7523..90fa7df 100644 --- a/.github/workflows/build-multiarch.yaml +++ b/.github/workflows/build-multiarch.yaml @@ -111,7 +111,7 @@ jobs: with: file: base.Dockerfile context: . - push: ${{ inputs.pushToRegistry || true }} + push: false platforms: "linux/${{ matrix.arch }}" provenance: false build-args: | @@ -129,7 +129,7 @@ jobs: with: file: builder.Dockerfile context: . - push: ${{ inputs.pushToRegistry || true }} + push: false platforms: "linux/${{ matrix.arch }}" provenance: false build-args: | From 48a599aa60e5bff505682a937f47c9a5107e727e Mon Sep 17 00:00:00 2001 From: David Mays Date: Thu, 14 Mar 2024 11:37:21 +0000 Subject: [PATCH 03/14] This seems to work, but fix the typo. --- .github/workflows/build-multiarch.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-multiarch.yaml b/.github/workflows/build-multiarch.yaml index 90fa7df..3e6eafe 100644 --- a/.github/workflows/build-multiarch.yaml +++ b/.github/workflows/build-multiarch.yaml @@ -145,7 +145,7 @@ jobs: - id: export-digests run: | - mkdir -p /tmp/digests/base /tmp/digests/base + mkdir -p /tmp/digests/base /tmp/digests/builder baseDigest="${{steps.build-base-image.outputs.digest }}" builderDigest="${{steps.build-builder-image.outputs.digest }}" touch "/tmp/digests/base/${baseDigest#sha256:}" From 99076a728bc150c49ceeef8037d14e3400a3e9a2 Mon Sep 17 00:00:00 2001 From: David Mays Date: Thu, 14 Mar 2024 11:46:09 +0000 Subject: [PATCH 04/14] Enable overwriting the artifact cache --- .github/workflows/build-multiarch.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-multiarch.yaml b/.github/workflows/build-multiarch.yaml index 3e6eafe..3009fd7 100644 --- a/.github/workflows/build-multiarch.yaml +++ b/.github/workflows/build-multiarch.yaml @@ -158,6 +158,7 @@ jobs: path: /tmp/digests/* if-no-files-found: error retention-days: 1 + overwrite: true combine_manifests: if: ${{ inputs.pushToRegistry || true }} From 8eb93a58b5ec145561403b93207150f198d954ce Mon Sep 17 00:00:00 2001 From: David Mays Date: Thu, 14 Mar 2024 13:47:10 +0000 Subject: [PATCH 05/14] Fix the matrix for the combine Job. --- .github/workflows/build-multiarch.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-multiarch.yaml b/.github/workflows/build-multiarch.yaml index 3009fd7..55f115f 100644 --- a/.github/workflows/build-multiarch.yaml +++ b/.github/workflows/build-multiarch.yaml @@ -35,7 +35,7 @@ jobs: - id: set-matrix run: | echo "matrix=$(jq -c . < build-matrix.json)" >> $GITHUB_OUTPUT - echo "matrix_versions=$(jq -c .version < build-matrix.json)" >> $GITHUB_OUTPUT + echo "matrix_versions=$(jq -c .version[] < build-matrix.json)" >> $GITHUB_OUTPUT build_and_push_image: name: Build ruby_${{ join(matrix.version.rubyver, '.') }} for ${{ matrix.arch }} and push to GHCR @@ -169,7 +169,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - version: ${{ fromJson(needs.configure_builds.outputs.matrix.version) }} + version: ${{ fromJson(needs.configure_builds.outputs.matrix_versions) }} permissions: packages: write steps: From 68fb8884596d25c451570031675f913b88f3d550 Mon Sep 17 00:00:00 2001 From: David Mays Date: Thu, 14 Mar 2024 14:03:01 +0000 Subject: [PATCH 06/14] Remove the square brackets from the JQ expression --- .github/workflows/build-multiarch.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-multiarch.yaml b/.github/workflows/build-multiarch.yaml index 55f115f..8a13791 100644 --- a/.github/workflows/build-multiarch.yaml +++ b/.github/workflows/build-multiarch.yaml @@ -35,7 +35,7 @@ jobs: - id: set-matrix run: | echo "matrix=$(jq -c . < build-matrix.json)" >> $GITHUB_OUTPUT - echo "matrix_versions=$(jq -c .version[] < build-matrix.json)" >> $GITHUB_OUTPUT + echo "matrix_versions=$(jq -c .version < build-matrix.json)" >> $GITHUB_OUTPUT build_and_push_image: name: Build ruby_${{ join(matrix.version.rubyver, '.') }} for ${{ matrix.arch }} and push to GHCR From 9f9bbecdec12cd0733eec62692b46c8d86673b6c Mon Sep 17 00:00:00 2001 From: David Mays Date: Thu, 14 Mar 2024 16:03:52 +0000 Subject: [PATCH 07/14] Add the missing output to the config job --- .github/workflows/build-multiarch.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-multiarch.yaml b/.github/workflows/build-multiarch.yaml index 8a13791..ca484a6 100644 --- a/.github/workflows/build-multiarch.yaml +++ b/.github/workflows/build-multiarch.yaml @@ -28,6 +28,7 @@ jobs: runs-on: ubuntu-latest outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} + matrix_versions: ${{ steps.set-matrix.outputs.matrix_versions }} steps: - uses: actions/checkout@v4 with: From a1155733788ff7f52c689d5f4e48eb01067f0ea5 Mon Sep 17 00:00:00 2001 From: David Mays Date: Mon, 25 Mar 2024 17:00:58 +0000 Subject: [PATCH 08/14] Testing load: true as suggested by GH Issues. --- .github/workflows/build-multiarch.yaml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-multiarch.yaml b/.github/workflows/build-multiarch.yaml index ca484a6..7350758 100644 --- a/.github/workflows/build-multiarch.yaml +++ b/.github/workflows/build-multiarch.yaml @@ -81,6 +81,11 @@ jobs: latest=false images: | ${{ env.REGISTRY_BASE }}/govuk-ruby-base + tags: | + type=semver,pattern={{raw}},value=${{ join(matrix.version.rubyver, '.') }} + type=raw,value=latest,enable=${{ matrix.version.extra == 'latest' }} + type=sha,enable=true,prefix=${{ join(matrix.version.rubyver, '.') }}-,format=short + type=sha,enable=true,priority=100,format=long,prefix=${{ join(matrix.version.rubyver, '.') }}- labels: | org.opencontainers.image.title=govuk-ruby-base org.opencontainers.image.authors=GOV.UK Platform Engineering @@ -98,6 +103,11 @@ jobs: latest=false images: | ${{ env.REGISTRY_BASE }}/govuk-ruby-builder + tags: | + type=semver,pattern={{raw}}value=${{ join(matrix.version.rubyver, '.') }} + type=raw,value=latest,enable=${{ matrix.version.extra == 'latest' }} + type=sha,enable=true,prefix=${{ join(matrix.version.rubyver, '.') }}-,format=short + type=sha,enable=true,priority=100,format=long,prefix=${{ join(matrix.version.rubyver, '.') }}- labels: | org.opencontainers.image.title=govuk-ruby-builder org.opencontainers.image.authors=GOV.UK Platform Engineering @@ -112,16 +122,15 @@ jobs: with: file: base.Dockerfile context: . - push: false platforms: "linux/${{ matrix.arch }}" + load: true provenance: false build-args: | RUBY_MAJOR=${{ matrix.version.rubyver[0] }}.${{ matrix.version.rubyver[1] }} RUBY_VERSION=${{ join(matrix.version.rubyver, '.') }} RUBY_CHECKSUM=${{ matrix.version.checksum }} - tags: ${{ steps.base-image-metadata.outputs.tags }} labels: ${{ steps.base-image-metadata.outputs.labels }} - outputs: type=image,name=${{ env.REGISTRY_BASE }}/govuk-ruby-base,push-by-digest=true,name-canonical=true + outputs: type=image,name=${{ env.REGISTRY_BASE }}/govuk-ruby-base,push-by-digest=true,name-canonical=true,push=true cache-from: type=gha,scope=build-base-${{ matrix.arch }} cache-to: type=gha,scope=build-base-${{ matrix.arch }},mode=max @@ -132,15 +141,15 @@ jobs: context: . push: false platforms: "linux/${{ matrix.arch }}" + load: true provenance: false build-args: | RUBY_MAJOR=${{ matrix.version.rubyver[0] }}.${{ matrix.version.rubyver[1] }} RUBY_VERSION=${{ join(matrix.version.rubyver, '.') }} RUBY_CHECKSUM=${{ matrix.version.checksum }} OWNER=${{ github.repository_owner }} - tags: ${{ steps.builder-image-metadata.outputs.tags }} labels: ${{ steps.builder-image-metadata.outputs.labels }} - outputs: type=image,name=${{ env.REGISTRY_BASE }}/govuk-ruby-builder,push-by-digest=true,name-canonical=true + outputs: type=image,name=${{ env.REGISTRY_BASE }}/govuk-ruby-builder,push-by-digest=true,name-canonical=true,push=true cache-from: type=gha,scope=build-builder-${{ matrix.arch }} cache-to: type=gha,scope=build-builder-${{ matrix.arch }},mode=max From e300ec48d1d30c6a11a53fcac55f7fb2e4a89ffb Mon Sep 17 00:00:00 2001 From: David Mays Date: Mon, 25 Mar 2024 18:22:19 +0000 Subject: [PATCH 09/14] Switch the working directory for this. --- .github/workflows/build-multiarch.yaml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-multiarch.yaml b/.github/workflows/build-multiarch.yaml index 7350758..5d7b297 100644 --- a/.github/workflows/build-multiarch.yaml +++ b/.github/workflows/build-multiarch.yaml @@ -249,14 +249,20 @@ 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 - working-directory: /tmp/digests + - 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 }}") \ + $(printf '${{ env.REGISTRY_BASE }}/govuk-ruby-builder@sha256:%s ' *) + - name: Inspect Images run: | docker buildx imagetools inspect ${{ env.REGISTRY_BASE }}/govuk-ruby-base:${{ steps.base-image-metadata.outputs.version }} From 698b3fd196be35188aef4b599204092cab5b7a41 Mon Sep 17 00:00:00 2001 From: David Mays Date: Tue, 26 Mar 2024 11:53:13 +0000 Subject: [PATCH 10/14] Run tree to debug whatthe digest outputs --- .github/workflows/build-multiarch.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/build-multiarch.yaml b/.github/workflows/build-multiarch.yaml index 5d7b297..cc52efe 100644 --- a/.github/workflows/build-multiarch.yaml +++ b/.github/workflows/build-multiarch.yaml @@ -160,6 +160,7 @@ jobs: builderDigest="${{steps.build-builder-image.outputs.digest }}" touch "/tmp/digests/base/${baseDigest#sha256:}" touch "/tmp/digests/builder/${builderDigest#sha256:}" + tree /tmp/digests - id: upload-digests uses: actions/upload-artifact@v4 @@ -249,6 +250,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: List Digests Storage (Debug) + run: | + tree /tmp/digests + - name: Create Manifest Lists (for Base) working-directory: /tmp/digests/base run: | From ff29de66bb5565f185a5810873fc1197e3c2a776 Mon Sep 17 00:00:00 2001 From: David Mays Date: Tue, 26 Mar 2024 16:43:52 +0000 Subject: [PATCH 11/14] Test diff between Env Var and Action Outputs --- .github/workflows/build-multiarch.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-multiarch.yaml b/.github/workflows/build-multiarch.yaml index cc52efe..1889a4d 100644 --- a/.github/workflows/build-multiarch.yaml +++ b/.github/workflows/build-multiarch.yaml @@ -250,9 +250,13 @@ 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: List Digests Storage (Debug) + - name: Debug - Step Output run: | - tree /tmp/digests + 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 From e670bca81da0b46faa0d6e5fda2d05a1b1704e18 Mon Sep 17 00:00:00 2001 From: David Mays Date: Tue, 26 Mar 2024 17:00:38 +0000 Subject: [PATCH 12/14] Fix some cache key issues --- .github/workflows/build-multiarch.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-multiarch.yaml b/.github/workflows/build-multiarch.yaml index 1889a4d..418f2d1 100644 --- a/.github/workflows/build-multiarch.yaml +++ b/.github/workflows/build-multiarch.yaml @@ -131,8 +131,8 @@ jobs: RUBY_CHECKSUM=${{ matrix.version.checksum }} labels: ${{ steps.base-image-metadata.outputs.labels }} outputs: type=image,name=${{ env.REGISTRY_BASE }}/govuk-ruby-base,push-by-digest=true,name-canonical=true,push=true - cache-from: type=gha,scope=build-base-${{ matrix.arch }} - cache-to: type=gha,scope=build-base-${{ matrix.arch }},mode=max + cache-from: type=gha,scope=build-base-${{ matrix.version.rubyver }}-${{ matrix.arch }} + cache-to: type=gha,scope=build-base-${{ matrix.version.rubyver }}-${{ matrix.arch }},mode=max - id: build-builder-image uses: docker/build-push-action@v5 @@ -150,8 +150,8 @@ jobs: OWNER=${{ github.repository_owner }} labels: ${{ steps.builder-image-metadata.outputs.labels }} outputs: type=image,name=${{ env.REGISTRY_BASE }}/govuk-ruby-builder,push-by-digest=true,name-canonical=true,push=true - cache-from: type=gha,scope=build-builder-${{ matrix.arch }} - cache-to: type=gha,scope=build-builder-${{ matrix.arch }},mode=max + cache-from: type=gha,scope=build-builder-${{ matrix.version.rubyver }}-${{ matrix.arch }} + cache-to: type=gha,scope=build-builder-${{ matrix.version.rubyver }}-${{ matrix.arch }},mode=max - id: export-digests run: | From b3adaa1276a8df81cc330af2352508724ba8996d Mon Sep 17 00:00:00 2001 From: David Mays Date: Tue, 26 Mar 2024 18:07:00 +0000 Subject: [PATCH 13/14] Quote the labels, JSON outputs being chopped-off. --- .github/workflows/build-multiarch.yaml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build-multiarch.yaml b/.github/workflows/build-multiarch.yaml index 418f2d1..c1e3b52 100644 --- a/.github/workflows/build-multiarch.yaml +++ b/.github/workflows/build-multiarch.yaml @@ -88,9 +88,9 @@ jobs: type=sha,enable=true,priority=100,format=long,prefix=${{ join(matrix.version.rubyver, '.') }}- labels: | org.opencontainers.image.title=govuk-ruby-base - org.opencontainers.image.authors=GOV.UK Platform Engineering - org.opencontainers.image.description=Base Image for GOV.UK Ruby-based Apps - org.opencontainers.image.source=https://github.com/alphagov/govuk-ruby-images + org.opencontainers.image.authors="GOV.UK Platform Engineering" + org.opencontainers.image.description="Base Image for GOV.UK Ruby-based Apps" + org.opencontainers.image.source="https://github.com/alphagov/govuk-ruby-images" org.opencontainers.image.version=${{ join(matrix.version.rubyver, '.') }} org.opencontainers.image.created=${{ steps.calculate-image-tags.outputs.createdDate }} org.opencontainers.image.vendor=GDS @@ -110,9 +110,9 @@ jobs: type=sha,enable=true,priority=100,format=long,prefix=${{ join(matrix.version.rubyver, '.') }}- labels: | org.opencontainers.image.title=govuk-ruby-builder - org.opencontainers.image.authors=GOV.UK Platform Engineering - org.opencontainers.image.description=Builder Image for GOV.UK Ruby-based Apps - org.opencontainers.image.source=https://github.com/alphagov/govuk-ruby-images + org.opencontainers.image.authors="GOV.UK Platform Engineering" + org.opencontainers.image.description="Builder Image for GOV.UK Ruby-based Apps" + org.opencontainers.image.source="https://github.com/alphagov/govuk-ruby-images" org.opencontainers.image.version=${{ join(matrix.version.rubyver, '.') }} org.opencontainers.image.created=${{ steps.calculate-image-tags.outputs.createdDate }} org.opencontainers.image.vendor=GDS @@ -216,9 +216,9 @@ jobs: ${{ env.REGISTRY_BASE }}/govuk-ruby-base labels: | org.opencontainers.image.title=govuk-ruby-base - org.opencontainers.image.authors=GOV.UK Platform Engineering - org.opencontainers.image.description=Base Image for GOV.UK Ruby-based Apps - org.opencontainers.image.source=https://github.com/alphagov/govuk-ruby-images + org.opencontainers.image.authors="GOV.UK Platform Engineering" + org.opencontainers.image.description="Base Image for GOV.UK Ruby-based Apps" + org.opencontainers.image.source="https://github.com/alphagov/govuk-ruby-images" org.opencontainers.image.version=${{ join(matrix.version.rubyver, '.') }} org.opencontainers.image.created=${{ steps.calculate-image-tags.outputs.createdDate }} org.opencontainers.image.vendor=GDS @@ -238,9 +238,9 @@ jobs: ${{ env.REGISTRY_BASE }}/govuk-ruby-builder labels: | org.opencontainers.image.title=govuk-ruby-builder - org.opencontainers.image.authors=GOV.UK Platform Engineering - org.opencontainers.image.description=Builder Image for GOV.UK Ruby-based Apps - org.opencontainers.image.source=https://github.com/alphagov/govuk-ruby-images + org.opencontainers.image.authors="GOV.UK Platform Engineering" + org.opencontainers.image.description="Builder Image for GOV.UK Ruby-based Apps" + org.opencontainers.image.source="https://github.com/alphagov/govuk-ruby-images" org.opencontainers.image.version=${{ join(matrix.version.rubyver, '.') }} org.opencontainers.image.created=${{ steps.calculate-image-tags.outputs.createdDate }} org.opencontainers.image.vendor=GDS From a70abab8dc7660e0db89721caaee0446b273135c Mon Sep 17 00:00:00 2001 From: David Mays Date: Tue, 2 Apr 2024 14:41:15 +0100 Subject: [PATCH 14/14] 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