Skip to content

Commit 18e48ea

Browse files
push tags not digest
1 parent 879c3b2 commit 18e48ea

1 file changed

Lines changed: 5 additions & 8 deletions

File tree

.github/workflows/build.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,8 @@ jobs:
4343
uses: docker/metadata-action@v5
4444
with:
4545
images: ${{ github.repository }}
46-
47-
- name: Sanitize registry repository name
48-
id: get-reg
49-
run: |
50-
echo "registry=$(echo '${{ steps.meta.outputs.tags }}' | cut -f1 -d:)" | tee -a "$GITHUB_OUTPUT"
46+
tags: |
47+
type=sha,suffix=-build-${{ github.run_id }}_${{ github.run_attempt }}-arch-${{ runner.arch }}
5148
5249
- name: Build/push the arch-specific image
5350
id: build
@@ -58,14 +55,14 @@ jobs:
5855
cache-to: type=gha,mode=max
5956
labels: ${{ steps.meta.outputs.labels }}
6057
provenance: true
58+
push: true
6159
sbom: true
62-
tags: ${{ steps.get-reg.outputs.registry }}
63-
outputs: type=image,push-by-digest=true,push=true
60+
tags: ${{ steps.meta.outputs.tags }}
6461

6562
- name: Write arch-specific image digest to outputs
6663
id: gen-output
6764
run: |
68-
echo "image-${RUNNER_ARCH,,}=${{ steps.get-reg.outputs.registry }}@${{ steps.build.outputs.digest }}" | tee -a "$GITHUB_OUTPUT"
65+
echo "image-${RUNNER_ARCH,,}=${DOCKER_METADATA_OUTPUT_TAGS}" | tee -a "$GITHUB_OUTPUT"
6966
7067
merge:
7168
runs-on: ubuntu-24.04

0 commit comments

Comments
 (0)