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