6
6
7
7
env :
8
8
IMAGE_NAME : pleisto/postgrs-extra
9
+
9
10
jobs :
10
- build :
11
- runs-on : ubuntu-latest
11
+ build-amd64 :
12
+ runs-on : ubuntu2404-pro-amd64
12
13
permissions :
13
14
contents : read
14
15
packages : write
15
16
steps :
16
- - name : Set up QEMU
17
- uses : docker/setup-qemu-action @v3
17
+ - name : Checkout code
18
+ uses : actions/checkout @v3
18
19
19
20
- name : Set up Docker Buildx
20
21
uses : docker/setup-buildx-action@v3
@@ -31,14 +32,50 @@ jobs:
31
32
uses : docker/metadata-action@v5
32
33
with :
33
34
images : ghcr.io/${{ env.IMAGE_NAME }}
34
-
35
- - name : Build and push Docker image
35
+
36
+ - name : Build and push Docker image for AMD64
36
37
uses : docker/build-push-action@v6
37
38
with :
39
+ context : .
38
40
push : true
39
- platforms : linux/amd64,linux/arm64
41
+ platforms : linux/amd64
40
42
tags : ${{ steps.meta.outputs.tags }}
41
43
labels : ${{ steps.meta.outputs.labels }}
42
44
cache-from : type=gha
43
45
cache-to : type=gha,mode=max
44
-
46
+
47
+ build-arm64 :
48
+ runs-on : ubuntu2404-pro-arm64
49
+ permissions :
50
+ contents : read
51
+ packages : write
52
+ steps :
53
+ - name : Checkout code
54
+ uses : actions/checkout@v3
55
+
56
+ - name : Set up Docker Buildx
57
+ uses : docker/setup-buildx-action@v3
58
+
59
+ - name : Login to GHCR
60
+ uses : docker/login-action@v3
61
+ with :
62
+ registry : ghcr.io
63
+ username : ${{ github.actor }}
64
+ password : ${{ secrets.GITHUB_TOKEN }}
65
+
66
+ - name : Extract metadata
67
+ id : meta
68
+ uses : docker/metadata-action@v5
69
+ with :
70
+ images : ghcr.io/${{ env.IMAGE_NAME }}
71
+
72
+ - name : Build and push Docker image for ARM64
73
+ uses : docker/build-push-action@v6
74
+ with :
75
+ context : .
76
+ push : true
77
+ platforms : linux/arm64
78
+ tags : ${{ steps.meta.outputs.tags }}
79
+ labels : ${{ steps.meta.outputs.labels }}
80
+ cache-from : type=gha
81
+ cache-to : type=gha,mode=max
0 commit comments