(ci) Add docker buildx options to support arm64 platform
@@ -58,14 +58,21 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
+ - name: Set up QEMU
+ uses: docker/setup-qemu-action@v1
+
+ - name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@v1
+
- name: Build and push docker image with edge tag
if: github.event_name == 'push'
uses: docker/build-push-action@v2
with:
context: .
+ platforms: linux/amd64,linux/arm64
labels: ${{ steps.meta.outputs.labels }}
tags: ${{ steps.meta.outputs.tags }}
- push: true
+ push: ${{ GitHub.event_name != 'pull_request' }}
- name: Build and push docker image with specific tag
if: github.event_name == 'release' || github.event_name == 'workflow_dispatch'
@@ -74,7 +81,7 @@ jobs:
context: .
labels: ${{ steps.meta.outputs.labels }}
tags: ${{ steps.meta.outputs.tags }}
- push: true
+ push: ${{ GitHub.event_name != 'pull_request' }}
- name: Docker Hub Description
if: github.event_name == 'release'
