From 8860da5cbf4d10a5473f7634f2da4023d8d16c77 Mon Sep 17 00:00:00 2001 From: Yevheniy Oliynyk Date: Mon, 9 Dec 2024 09:25:15 +0100 Subject: [PATCH] feat: multiplatform docker build (#872) --- .github/workflows/publish.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 57f7aed0..dac8b94e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -203,10 +203,14 @@ jobs: run: | cp packages/docker/Dockerfile Dockerfile + # to enable buildx (multiplatform build) + - uses: docker/setup-qemu-action@v3 + - uses: docker/setup-buildx-action@v3 + - name: Build Docker image run: | docker login -u "${{ secrets.DOCKER_USERNAME }}" -p "${{ secrets.DOCKER_PASSWORD }}" docker.io - docker build --pull -t "${{ secrets.DOCKER_HUB_REGISTRY_IMAGE }}:${{ github.ref_name }}" -t "${{ secrets.DOCKER_HUB_REGISTRY_IMAGE }}:latest" . + docker buildx build --platform linux/amd64,linux/arm64 --pull -t "${{ secrets.DOCKER_HUB_REGISTRY_IMAGE }}:${{ github.ref_name }}" -t "${{ secrets.DOCKER_HUB_REGISTRY_IMAGE }}:latest" . docker push "${{ secrets.DOCKER_HUB_REGISTRY_IMAGE }}:${{ github.ref_name }}" docker push "${{ secrets.DOCKER_HUB_REGISTRY_IMAGE }}:latest"