@@ -3,7 +3,7 @@ run-name: Build Release ${{ github.ref_name }}
33
44on :
55 release :
6- types :
6+ types :
77 - published
88
99env :
@@ -26,49 +26,49 @@ jobs:
2626 attestations : write
2727
2828 steps :
29- - name : Checkout repository
30- uses : actions/checkout@v5
29+ - name : Checkout repository
30+ uses : actions/checkout@v5
3131
32- - name : Set up Docker Buildx
33- uses : docker/setup-buildx-action@v3
32+ - name : Set up Docker Buildx
33+ uses : docker/setup-buildx-action@v3
3434
35- - name : Log in to container registry
36- uses : docker/login-action@v3
37- with :
38- registry : ${{ env.REGISTRY }}
39- username : ${{ github.actor }}
40- password : ${{ secrets.GITHUB_TOKEN }}
35+ - name : Log in to container registry
36+ uses : docker/login-action@v3
37+ with :
38+ registry : ${{ env.REGISTRY }}
39+ username : ${{ github.actor }}
40+ password : ${{ secrets.GITHUB_TOKEN }}
4141
42- - name : Extract metadata
43- id : meta
44- uses : docker/metadata-action@v5
45- with :
46- images : ${{ env.IMAGE_NAME }}
47- tags : |
48- type=ref,event=tag
49- type=semver,pattern=v{{version}}
50- type=semver,pattern=v{{major}}.{{minor}}
51- type=semver,pattern=v{{major}},enable=${{ !startsWith(github.ref, 'refs/tags/v0.') }}
52- type=raw,value=latest,enable={{is_default_branch}}
42+ - name : Extract metadata
43+ id : meta
44+ uses : docker/metadata-action@v5
45+ with :
46+ images : ${{ env.IMAGE_NAME }}
47+ tags : |
48+ type=ref,event=tag
49+ type=semver,pattern=v{{version}}
50+ type=semver,pattern=v{{major}}.{{minor}}
51+ type=semver,pattern=v{{major}},enable=${{ !startsWith(github.ref, 'refs/tags/v0.') }}
52+ type=raw,value=latest,enable={{is_default_branch}}
5353
54- - name : Build and push Docker image
55- uses : docker/build-push-action@v6
56- id : build
57- with :
58- context : .
59- platforms : ${{ env.PLATFORMS }}
60- push : true
61- sbom : true
62- provenance : mode=max
63- tags : ${{ steps.meta.outputs.tags }}
64- labels : ${{ steps.meta.outputs.labels }}
65- cache-from : type=gha
66- cache-to : type=gha,mode=max
54+ - name : Build and push Docker image
55+ uses : docker/build-push-action@v6
56+ id : build
57+ with :
58+ context : .
59+ platforms : ${{ env.PLATFORMS }}
60+ push : true
61+ sbom : true
62+ provenance : mode=max
63+ tags : ${{ steps.meta.outputs.tags }}
64+ labels : ${{ steps.meta.outputs.labels }}
65+ cache-from : type=gha
66+ cache-to : type=gha,mode=max
6767
68- - name : Generate artifact attestation
69- uses : actions/attest-build-provenance@v3
70- with :
71- subject-name : ${{ env.IMAGE_NAME}}
72- subject-digest : ${{ steps.build.outputs.digest }}
73- # [ ] enable when requested, otherwise github packages UI shows broken example
74- # push-to-registry: true
68+ - name : Generate artifact attestation
69+ uses : actions/attest-build-provenance@v3
70+ with :
71+ subject-name : ${{ env.IMAGE_NAME}}
72+ subject-digest : ${{ steps.build.outputs.digest }}
73+ # [ ] enable when requested, otherwise github packages UI shows broken example
74+ # push-to-registry: true
0 commit comments