From fb7dd7da2e1eadedc5292b958e3d7fe25a7efa0b Mon Sep 17 00:00:00 2001 From: David Mays Date: Mon, 5 Aug 2024 16:32:55 +0100 Subject: [PATCH 1/2] Try using the annotations JSON instead. --- .github/workflows/build-multiarch.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-multiarch.yaml b/.github/workflows/build-multiarch.yaml index 0d20524..1e7d90e 100644 --- a/.github/workflows/build-multiarch.yaml +++ b/.github/workflows/build-multiarch.yaml @@ -237,6 +237,7 @@ jobs: run: | # shellcheck disable=SC2046 docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ + $(jq -cr '.annotations | map("--annotation " + "'" + . + "'") | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ $(printf '${{ env.REGISTRY_BASE }}/govuk-ruby-base@sha256:%s ' *) - name: Generate Builder Image Metadata @@ -269,7 +270,7 @@ jobs: run: | # shellcheck disable=SC2046 docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ - $(jq -cr '.labels | to_entries | map("--annotation '" + (.key + "=" + .value) + "'") | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ + $(jq -cr '.annotations | map("--annotation " + "'" + . + "'") | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ $(printf '${{ env.REGISTRY_BASE }}/govuk-ruby-builder@sha256:%s ' *) - name: Inspect Images From ac598705fb27aaad491e270ce2d0ce7294568a5f Mon Sep 17 00:00:00 2001 From: David Mays Date: Tue, 6 Aug 2024 16:17:00 +0100 Subject: [PATCH 2/2] Disable Annotations for now, JQ is hard to debug --- .github/workflows/build-multiarch.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/build-multiarch.yaml b/.github/workflows/build-multiarch.yaml index 1e7d90e..b54c456 100644 --- a/.github/workflows/build-multiarch.yaml +++ b/.github/workflows/build-multiarch.yaml @@ -237,7 +237,6 @@ jobs: run: | # shellcheck disable=SC2046 docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ - $(jq -cr '.annotations | map("--annotation " + "'" + . + "'") | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ $(printf '${{ env.REGISTRY_BASE }}/govuk-ruby-base@sha256:%s ' *) - name: Generate Builder Image Metadata @@ -270,7 +269,6 @@ jobs: run: | # shellcheck disable=SC2046 docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ - $(jq -cr '.annotations | map("--annotation " + "'" + . + "'") | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ $(printf '${{ env.REGISTRY_BASE }}/govuk-ruby-builder@sha256:%s ' *) - name: Inspect Images