Commit c31ede4 1 parent babb018 commit c31ede4 Copy full SHA for c31ede4
File tree 1 file changed +34
-4
lines changed
1 file changed +34
-4
lines changed Original file line number Diff line number Diff line change 6
6
jobs :
7
7
build :
8
8
runs-on : ubuntu-latest
9
+ env :
10
+ REGISTRY : docker.io
11
+ IMAGE_NAME : knuthuehne/jedeschule-api
12
+ permissions :
13
+ packages : write
14
+ contents : read
15
+ attestations : write
16
+ id-token : write
9
17
steps :
10
- - uses : actions/checkout@v1
11
- - name : Publish to Registry
12
-
18
+ - uses : actions/checkout@v4
19
+ - name : Log in to Docker Hub
20
+ uses : docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
13
21
with :
14
- name : knuthuehne/jedeschule-api
15
22
username : ${{ secrets.DOCKERHUB_USERNAME }}
16
23
password : ${{ secrets.DOCKERHUB_PASSWORD }}
24
+ - name : Extract metadata (tags, labels) for Docker
25
+ id : meta
26
+ uses : docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
27
+ with :
28
+ images : ${{ env.IMAGE_NAME}}
29
+ tags : |
30
+ type=raw,value=latest
31
+ type=sha
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
+ - name : Generate artifact attestation
42
+ uses : actions/attest-build-provenance@v2
43
+ with :
44
+ subject-name : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
45
+ subject-digest : ${{ steps.push.outputs.digest }}
46
+ push-to-registry : true
17
47
deploy :
18
48
needs : build
19
49
runs-on : ubuntu-latest
You can’t perform that action at this time.
0 commit comments