Skip to content

Commit d1fe60f

Browse files
committed
add tags
1 parent f23bef7 commit d1fe60f

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

.github/workflows/build-attest.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,26 @@ jobs:
4141
username: ${{ secrets.QUAY_USERNAME }}
4242
password: ${{ secrets.QUAY_PASSWORD }}
4343

44+
- name: Extract metadata for container image
45+
id: meta
46+
uses: docker/metadata-action@v5
47+
with:
48+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
49+
tags: |
50+
type=ref,event=branch
51+
type=ref,event=pr
52+
type=sha,prefix={{branch}}-
53+
type=raw,value=latest,enable={{is_default_branch}}
54+
4455
- name: Build and push container image
4556
id: push
4657
uses: docker/build-push-action@v6
4758
with:
4859
context: .
4960
file: ./Containerfile
5061
push: true
62+
tags: ${{ steps.meta.outputs.tags }}
63+
labels: ${{ steps.meta.outputs.labels }}
5164

5265
- name: Generate SBOM for container image
5366
uses: anchore/sbom-action@v0

0 commit comments

Comments
 (0)