File tree 1 file changed +49
-0
lines changed
1 file changed +49
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish Docker image
2
+
3
+ on :
4
+ release :
5
+ types : [published]
6
+
7
+ jobs :
8
+ push_to_registry :
9
+ name : Push Docker image to Docker Hub
10
+ runs-on : ubuntu-latest
11
+ permissions :
12
+ packages : write
13
+ contents : read
14
+ attestations : write
15
+ id-token : write
16
+ steps :
17
+ - name : Check out the repo
18
+ uses : actions/checkout@v4
19
+
20
+ - name : Log in to Docker Hub
21
+ uses : docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
22
+ with :
23
+ username : ${{ secrets.DOCKER_USERNAME }}
24
+ password : ${{ secrets.DOCKER_PASSWORD }}
25
+
26
+ - name : Extract metadata (tags, labels) for Docker
27
+ id : meta
28
+ uses : docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
29
+ with :
30
+ images : edgurgel/poxa-automated
31
+
32
+ - name : Build and push Docker image
33
+ id : push
34
+ uses : docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
35
+ with :
36
+ context : .
37
+ file : ./Dockerfile
38
+ push : true
39
+ tags : ${{ steps.meta.outputs.tags }}
40
+ labels : ${{ steps.meta.outputs.labels }}
41
+
42
+ - name : Generate artifact attestation
43
+ uses : actions/attest-build-provenance@v1
44
+ with :
45
+ subject-name : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
46
+ subject-digest : ${{ steps.push.outputs.digest }}
47
+ push-to-registry : true
48
+
49
+
You can’t perform that action at this time.
0 commit comments