diff --git a/.github/workflows/build_container.yml b/.github/workflows/build_container.yml index 7d0316c6f..41b623fef 100644 --- a/.github/workflows/build_container.yml +++ b/.github/workflows/build_container.yml @@ -17,6 +17,7 @@ env: IMAGE_NAME: sonarqube-ecocode IMAGES: | ghcr.io/${{ github.repository_owner }}/sonarqube-ecocode + PLATFORMS: linux/amd64,linux/arm64/v8 jobs: Build: @@ -65,10 +66,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 4233f483c..d32d7b802 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM maven:3-openjdk-11-slim AS builder +FROM --platform=linux/amd64 maven:3-openjdk-11-slim AS builder COPY . /usr/src/ecocode