File tree Expand file tree Collapse file tree 2 files changed +21
-39
lines changed
Expand file tree Collapse file tree 2 files changed +21
-39
lines changed Original file line number Diff line number Diff line change 1919
2020 permissions :
2121 packages : write
22- contents : write
22+ contents : read
2323 attestations : write
2424 id-token : write
2525
@@ -33,10 +33,24 @@ jobs:
3333 username : ${{ github.actor }}
3434 password : ${{ secrets.GITHUB_TOKEN }}
3535
36- - uses : goreleaser/goreleaser-action@v6
37- if : success() && startsWith(github.ref, 'refs/tags/')
36+ - name : Extract metadata (tags, labels) for Docker
37+ id : meta
38+ uses : docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
3839 with :
39- version : latest
40- args : release
41- env :
42- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
40+ images : ghcr.io/${{ env.IMAGE_NAME }}
41+
42+ - name : Build and push Docker image
43+ id : push
44+ uses : docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
45+ with :
46+ context : .
47+ push : true
48+ tags : ${{ steps.meta.outputs.tags }}
49+ labels : ${{ steps.meta.outputs.labels }}
50+
51+ - name : Generate artifact attestation
52+ uses : actions/attest-build-provenance@v3
53+ with :
54+ subject-name : ghcr.io/${{ env.IMAGE_NAME }}
55+ subject-digest : ${{ steps.push.outputs.digest }}
56+ push-to-registry : true
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments