8
8
- v*
9
9
10
10
jobs :
11
- build-and-push-image :
11
+ build-and-push-images :
12
12
runs-on : ubuntu-latest
13
13
14
14
permissions :
@@ -19,15 +19,23 @@ jobs:
19
19
- name : Checkout repository
20
20
uses : actions/checkout@v4
21
21
22
+ - name : Set up QEMU for multi-arch builds
23
+ uses : docker/setup-qemu-action@v3
24
+
25
+ - name : Set up Docker Buildx
26
+ id : buildx
27
+ uses : docker/setup-buildx-action@v3
28
+
22
29
- name : Log in to the Container registry
23
30
uses : docker/login-action@v3
24
31
with :
25
32
registry : ghcr.io
26
33
username : ${{ github.repository_owner }}
27
34
password : ${{ secrets.GITHUB_TOKEN }}
28
35
29
- - name : Extract metadata (tags, labels) for Docker
30
- id : meta
36
+ # Extract tags with suffixes for prod and worker
37
+ - name : Extract metadata (tags, labels) for Docker (prod)
38
+ id : meta_prod
31
39
uses : docker/metadata-action@v5
32
40
with :
33
41
images : ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}
@@ -37,12 +45,14 @@ jobs:
37
45
type=semver,pattern={{major}}
38
46
type=edge,branch=main
39
47
40
- - name : Build and push Docker image
48
+ # Build and push multi-arch prod image
49
+ - name : Build and push prod Docker image (Multi-Arch)
41
50
uses : docker/build-push-action@v6
42
51
with :
43
52
context : .
44
53
file : ./Dockerfile
45
54
push : true
46
- tags : ${{ steps.meta.outputs.tags }}
47
- labels : ${{ steps.meta.outputs.labels }}
48
- target : prod
55
+ platforms : linux/amd64,linux/arm64/v8
56
+ tags : ${{ steps.meta_prod.outputs.tags }}
57
+ labels : ${{ steps.meta_prod.outputs.labels }}
58
+ target : prod
0 commit comments