File tree 1 file changed +45
-2
lines changed
1 file changed +45
-2
lines changed Original file line number Diff line number Diff line change 1
- name : Docker build and push
1
+ name : Docker
2
2
3
3
on :
4
4
pull_request :
15
15
IMAGE_NAME : ${{ github.repository }}
16
16
17
17
jobs :
18
- docker-build-and-push :
18
+ build :
19
+ runs-on : ubuntu-latest
20
+ strategy :
21
+ fail-fast : false
22
+ matrix :
23
+ platform :
24
+ - linux/amd64
25
+ - linux/arm64
26
+
27
+ permissions :
28
+ contents : read
29
+ packages : write
30
+ attestations : write
31
+ id-token : write
32
+
33
+ steps :
34
+ - name : Checkout repository
35
+ uses : actions/checkout@v4
36
+
37
+ - name : Set up QEMU
38
+ uses : docker/setup-qemu-action@v3
39
+
40
+ - name : Set up Docker Buildx
41
+ uses : docker/setup-buildx-action@v3
42
+
43
+ - name : Log in to the Container registry
44
+ uses : docker/login-action@v3
45
+ with :
46
+ registry : ${{ env.REGISTRY }}
47
+ username : ${{ github.actor }}
48
+ password : ${{ secrets.GITHUB_TOKEN }}
49
+
50
+ - name : Build and cache Docker image
51
+ id : push
52
+ uses : docker/build-push-action@v6
53
+ with :
54
+ context : .
55
+ platforms : ${{ matrix.platform }}
56
+ cache-from : type=gha
57
+ cache-to : type=gha,mode=max
58
+ push : false
59
+
60
+ push :
61
+ needs : build
19
62
runs-on : ubuntu-latest
20
63
21
64
permissions :
You can’t perform that action at this time.
0 commit comments