11
11
IMAGE_NAME : ${{ github.repository }}
12
12
13
13
jobs :
14
- build-and-push-image :
14
+ build :
15
15
runs-on : ubuntu-latest
16
16
if : ${{ github.event.workflow_run.conclusion == 'success' }}
17
17
@@ -21,32 +21,48 @@ jobs:
21
21
attestations : write
22
22
id-token : write
23
23
24
+ strategy :
25
+ fail-fast : false
26
+ matrix :
27
+ platform :
28
+ - linux/amd64
29
+ - linux/arm64
30
+
24
31
steps :
25
32
- name : Checkout repository
26
33
uses : actions/checkout@v4
27
34
35
+ - name : Prepare
36
+ run : |
37
+ platform=${{ matrix.platform }}
38
+ echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
39
+
28
40
- name : Log in to the Container registry
29
- uses : docker/login-action@327cd5a69de6c009b9ce71bce8395f28e651bf99
41
+ uses : docker/login-action@v3
30
42
with :
31
43
registry : ${{ env.REGISTRY }}
32
44
username : ${{ github.actor }}
33
45
password : ${{ secrets.GITHUB_TOKEN }}
34
46
35
47
- name : Extract metadata (tags, labels) for Docker
36
48
id : meta
37
- uses : docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804
49
+ uses : docker/metadata-action@v5
38
50
with :
39
51
images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
40
52
41
- - name : Sync theme submodule
42
- run : git submodule sync && git submodule update --init --recursive
53
+ - name : Set up QEMU
54
+ uses : docker/setup-qemu-action@v3
55
+
56
+ - name : Set up Docker Buildx
57
+ uses : docker/setup-buildx-action@v3
43
58
44
59
- name : Build and push Docker image
45
60
id : push
46
- uses : docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4
61
+ uses : docker/build-push-action@v6
47
62
with :
48
63
context : .
49
64
push : true
65
+ platforms : ${{ matrix.platform }}
50
66
tags : ${{ steps.meta.outputs.tags }}
51
67
labels : ${{ steps.meta.outputs.labels }}
52
68
0 commit comments