diff --git a/.github/workflows/build_container.yml b/.github/workflows/build_container.yml index 82087107..8fc5d5a9 100644 --- a/.github/workflows/build_container.yml +++ b/.github/workflows/build_container.yml @@ -17,6 +17,7 @@ env: IMAGE_NAME: sonarqube-ecocode-mobile IMAGES: | ghcr.io/${{ github.repository_owner }}/sonarqube-ecocode-mobile + PLATFORMS: linux/amd64,linux/arm64/v8 jobs: Build: runs-on: ubuntu-latest @@ -63,10 +64,12 @@ jobs: type=ref,event=pr type=sha - - name: Publish image + - name: Build and publish image id: push uses: docker/build-push-action@v4 with: + context: . + platforms: ${{ env.PLATFORMS }} push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} diff --git a/Dockerfile b/Dockerfile index d947cf83..2577a1a3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM maven:3.8-openjdk-11-slim AS builder +FROM --platform=linux/amd64 maven:3.8-openjdk-11-slim AS builder COPY . /usr/src/ecocode