diff --git a/.github/workflows/build_and_publish.yml b/.github/workflows/build_and_publish.yml index c434451..da4fef1 100644 --- a/.github/workflows/build_and_publish.yml +++ b/.github/workflows/build_and_publish.yml @@ -34,14 +34,12 @@ jobs: uses: docker/setup-buildx-action@v3 - name: Login to DockerHub - if: github.event_name != 'pull_request' uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Login to Docker Hub - if: github.event_name != 'pull_request' uses: docker/login-action@v3 with: registry: ghcr.io @@ -52,6 +50,7 @@ jobs: uses: docker/build-push-action@v5 with: context: . - push: ${{ github.event_name != 'pull_request' }} + platforms: linux/amd64,linux/arm64 + push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index feec767..e327331 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ RUN go mod download COPY main.go main.go # Build -RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o insights-handler main.go +RUN CGO_ENABLED=0 GOOS=linux GOARCH=${ARCH} go build -a -o insights-handler main.go # we pull the trivy binary from aquasec's alpine based image FROM aquasec/trivy:0.49.1 as trivy