Skip to content

Commit 78f44ff

Browse files
committed
Add arm64 support using buildx
Signed-off-by: odidev <[email protected]>
1 parent ad2a7bb commit 78f44ff

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

.github/workflows/main.yml

+22
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,24 @@ jobs:
2323
postgis: '2.5'
2424
- postgres: '14beta3'
2525
postgis: '2.5'
26+
- postgres: 9.6
27+
postgis: '2.5'
28+
variant: default
29+
- postgres: 9.6
30+
postgis: '3.1'
31+
variant: default
32+
- postgres: 10
33+
postgis: '2.5'
34+
variant: default
35+
- postgres: 10
36+
postgis: '3.1'
37+
variant: default
38+
- postgres: 11
39+
postgis: '2.5'
40+
variant: default
41+
- postgres: 11
42+
postgis: '3.1'
43+
variant: default
2644
include:
2745
- postgres: 12
2846
postgis: master
@@ -41,6 +59,10 @@ jobs:
4159
- name: Checkout source
4260
uses: actions/checkout@v2
4361

62+
- name: Set up QEMU
63+
uses: docker/setup-qemu-action@v1
64+
- name: Set up Docker Buildx
65+
uses: docker/setup-buildx-action@v1
4466
- name: Build docker image for ${{ env.VERSION }} ${{ env.VARIANT }}
4567
run: make test
4668

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,11 @@ push: $(foreach version,$(VERSIONS),push-$(version)) $(PUSH_DEP)
123123
define push-version
124124
push-$1: test-$1
125125
ifeq ($(do_default),true)
126-
$(DOCKER) image push $(REPO_NAME)/$(IMAGE_NAME):$(version)
126+
$(DOCKER) buildx build --platform linux/arm64,linux/amd64 -t $(REPO_NAME)/$(IMAGE_NAME):$(version) $1
127127
endif
128128
ifeq ($(do_alpine),true)
129129
ifneq ("$(wildcard $1/alpine)","")
130-
$(DOCKER) image push $(REPO_NAME)/$(IMAGE_NAME):$(version)-alpine
130+
$(DOCKER) buildx build --platform linux/arm64,linux/amd64 -t $(REPO_NAME)/$(IMAGE_NAME):$(version)-alpine $1/alpine
131131
endif
132132
endif
133133
endef

0 commit comments

Comments
 (0)