File tree 1 file changed +42
-0
lines changed
1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change
1
+
2
+ name : Build Docker Image
3
+
4
+ on :
5
+ push :
6
+ pull_request :
7
+
8
+ jobs :
9
+ build :
10
+ strategy :
11
+ matrix :
12
+ include :
13
+ - runner : ubuntu-24.04
14
+ platform : linux/amd64
15
+ arch : amd64
16
+ - runner : ubuntu-24.04-arm
17
+ platform : linux/arm64
18
+ arch : arm64
19
+ runs-on : ${{ matrix.runner }}
20
+ steps :
21
+ - name : Checkout repository
22
+ uses : actions/checkout@v4
23
+ with :
24
+ submodules : recursive
25
+ fetch-depth : 0
26
+
27
+ - name : Set up Docker Buildx
28
+ uses : docker/setup-buildx-action@v3
29
+
30
+
31
+ - name : Build Docker image for ${{ matrix.arch }}
32
+ uses : docker/build-push-action@v5
33
+ with :
34
+ context : .
35
+ file : ./Dockerfile
36
+ platforms : ${{ matrix.platform }}
37
+ push : false
38
+ tags : your-image-name:${{ matrix.arch }}-${{ github.sha }},your-image-name:${{ matrix.arch }}-latest
39
+ cache-from : type=gha
40
+ cache-to : type=gha,mode=max
41
+
42
+
You can’t perform that action at this time.
0 commit comments