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