File tree Expand file tree Collapse file tree 1 file changed +54
-0
lines changed Expand file tree Collapse file tree 1 file changed +54
-0
lines changed Original file line number Diff line number Diff line change 1+ name : docker-push
2+
3+ on :
4+ push :
5+ branches :
6+ - master
7+ workflow_dispatch :
8+
9+ env :
10+ REGISTRY : ghcr.io
11+ IMAGE_NAME : google/tsunami-security-scanner-callback-server
12+
13+ jobs :
14+ build-and-push-image :
15+ runs-on : ubuntu-latest
16+
17+ permissions :
18+ contents : read
19+ packages : write
20+ attestations : write
21+ id-token : write
22+
23+ steps :
24+ - name : Checkout repository
25+ uses : actions/checkout@v4
26+
27+ - name : Log in to the Container registry
28+ uses : docker/login-action@v3
29+ with :
30+ registry : ${{ env.REGISTRY }}
31+ username : ${{ github.actor }}
32+ password : ${{ secrets.GITHUB_TOKEN }}
33+
34+ - name : Extract metadata for Docker
35+ id : meta
36+ uses : docker/metadata-action@v5
37+ with :
38+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
39+
40+ - name : Build and push Docker image
41+ id : push
42+ uses : docker/build-push-action@v6
43+ with :
44+ context : .
45+ push : true
46+ tags : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
47+ labels : ${{ steps.meta.outputs.labels }}
48+
49+ - name : Generate artifact attestation
50+ uses : actions/attest-build-provenance@v2
51+ with :
52+ subject-name : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
53+ subject-digest : ${{ steps.push.outputs.digest }}
54+ push-to-registry : true
You can’t perform that action at this time.
0 commit comments