Skip to content

Commit

Permalink
Add full version tags and annotate manifests.
Browse files Browse the repository at this point in the history
  • Loading branch information
dj-maisy committed Aug 5, 2024
1 parent bea241f commit 8d2f414
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/build-multiarch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,12 @@ jobs:
${{ env.REGISTRY_BASE }}/govuk-ruby-base
tags: |
type=raw,value=${{ matrix.version.rubyver[0] }}.${{ matrix.version.rubyver[1] }}
type=raw,value=${{ join(matrix.version.rubyver, '.') }}
type=raw,value=latest,enable=${{ matrix.version.extra == 'latest' }}
type=sha,enable=true,prefix=${{ matrix.version.rubyver[0] }}.${{ matrix.version.rubyver[1] }}-,format=short
type=sha,enable=true,prefix=${{ join(matrix.version.rubyver, '.') }}-,format=short
type=sha,enable=true,priority=100,format=long,prefix=${{ matrix.version.rubyver[0] }}.${{ matrix.version.rubyver[1] }}-
type=sha,enable=true,priority=200,format=long,prefix=${{ join(matrix.version.rubyver, '.') }}-
labels: |
org.opencontainers.image.title=govuk-ruby-base
org.opencontainers.image.authors="GOV.UK Platform Engineering"
Expand All @@ -103,9 +106,12 @@ jobs:
${{ env.REGISTRY_BASE }}/govuk-ruby-builder
tags: |
type=raw,value=${{ matrix.version.rubyver[0] }}.${{ matrix.version.rubyver[1] }}
type=raw,value=${{ join(matrix.version.rubyver, '.') }}
type=raw,value=latest,enable=${{ matrix.version.extra == 'latest' }}
type=sha,enable=true,prefix=${{ matrix.version.rubyver[0] }}.${{ matrix.version.rubyver[1] }}-,format=short
type=sha,enable=true,prefix=${{ join(matrix.version.rubyver, '.') }}-,format=short
type=sha,enable=true,priority=100,format=long,prefix=${{ matrix.version.rubyver[0] }}.${{ matrix.version.rubyver[1] }}-
type=sha,enable=true,priority=200,format=long,prefix=${{ join(matrix.version.rubyver, '.') }}-
labels: |
org.opencontainers.image.title=govuk-ruby-builder
org.opencontainers.image.authors="GOV.UK Platform Engineering"
Expand Down Expand Up @@ -219,9 +225,12 @@ jobs:
org.opencontainers.image.vendor=GDS
tags: |
type=raw,value=${{ matrix.version.rubyver[0] }}.${{ matrix.version.rubyver[1] }}
type=raw,value=${{ join(matrix.version.rubyver, '.') }}
type=raw,value=latest,enable=${{ matrix.version.extra == 'latest' }}
type=sha,enable=true,prefix=${{ matrix.version.rubyver[0] }}.${{ matrix.version.rubyver[1] }}-,format=short
type=sha,enable=true,prefix=${{ join(matrix.version.rubyver, '.') }}-,format=short
type=sha,enable=true,priority=100,format=long,prefix=${{ matrix.version.rubyver[0] }}.${{ matrix.version.rubyver[1] }}-
type=sha,enable=true,priority=200,format=long,prefix=${{ join(matrix.version.rubyver, '.') }}-
- name: Create Manifest Lists (for Base)
working-directory: /tmp/digests/base
Expand All @@ -248,15 +257,19 @@ jobs:
org.opencontainers.image.vendor=GDS
tags: |
type=raw,value=${{ matrix.version.rubyver[0] }}.${{ matrix.version.rubyver[1] }}
type=raw,value=${{ join(matrix.version.rubyver, '.') }}
type=raw,value=latest,enable=${{ matrix.version.extra == 'latest' }}
type=sha,enable=true,prefix=${{ matrix.version.rubyver[0] }}.${{ matrix.version.rubyver[1] }}-,format=short
type=sha,enable=true,prefix=${{ join(matrix.version.rubyver, '.') }}-,format=short
type=sha,enable=true,priority=100,format=long,prefix=${{ matrix.version.rubyver[0] }}.${{ matrix.version.rubyver[1] }}-
type=sha,enable=true,priority=200,format=long,prefix=${{ join(matrix.version.rubyver, '.') }}-
- name: Create Manifest Lists (for Builder)
working-directory: /tmp/digests/builder
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") \
$(printf '${{ env.REGISTRY_BASE }}/govuk-ruby-builder@sha256:%s ' *)
- name: Inspect Images
Expand Down

0 comments on commit 8d2f414

Please sign in to comment.