Skip to content

Commit

Permalink
Add arm64 support using buildx
Browse files Browse the repository at this point in the history
Signed-off-by: odidev <[email protected]>
  • Loading branch information
odidev committed Sep 23, 2021
1 parent ad2a7bb commit 78f44ff
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,24 @@ jobs:
postgis: '2.5'
- postgres: '14beta3'
postgis: '2.5'
- postgres: 9.6
postgis: '2.5'
variant: default
- postgres: 9.6
postgis: '3.1'
variant: default
- postgres: 10
postgis: '2.5'
variant: default
- postgres: 10
postgis: '3.1'
variant: default
- postgres: 11
postgis: '2.5'
variant: default
- postgres: 11
postgis: '3.1'
variant: default
include:
- postgres: 12
postgis: master
Expand All @@ -41,6 +59,10 @@ jobs:
- name: Checkout source
uses: actions/checkout@v2

- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Build docker image for ${{ env.VERSION }} ${{ env.VARIANT }}
run: make test

Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,11 @@ push: $(foreach version,$(VERSIONS),push-$(version)) $(PUSH_DEP)
define push-version
push-$1: test-$1
ifeq ($(do_default),true)
$(DOCKER) image push $(REPO_NAME)/$(IMAGE_NAME):$(version)
$(DOCKER) buildx build --platform linux/arm64,linux/amd64 -t $(REPO_NAME)/$(IMAGE_NAME):$(version) $1
endif
ifeq ($(do_alpine),true)
ifneq ("$(wildcard $1/alpine)","")
$(DOCKER) image push $(REPO_NAME)/$(IMAGE_NAME):$(version)-alpine
$(DOCKER) buildx build --platform linux/arm64,linux/amd64 -t $(REPO_NAME)/$(IMAGE_NAME):$(version)-alpine $1/alpine
endif
endif
endef
Expand Down

0 comments on commit 78f44ff

Please sign in to comment.