From 170837f3d309ae8b514a8a63302dfa8c80eb6f04 Mon Sep 17 00:00:00 2001 From: zufardhiyaulhaq Date: Mon, 10 Jun 2024 18:37:05 +0700 Subject: [PATCH] feat: fix multi build Signed-off-by: zufardhiyaulhaq --- .github/workflows/publish.yml | 1 + Dockerfile | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8f13986..2a3eddb 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -73,6 +73,7 @@ jobs: with: context: . push: ${{ github.event_name != 'pull_request' }} + provenance: false tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha diff --git a/Dockerfile b/Dockerfile index 5e75640..2865651 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ ################# # Builder image ################# -FROM golang:1.22-bullseye AS builder +FROM --platform=$BUILDPLATFORM golang:1.22-bullseye AS builder WORKDIR /app COPY . . @@ -10,7 +10,7 @@ RUN CGO_ENABLED=0 go build main.go ################# # Final image ################# -FROM gcr.io/distroless/base +FROM --platform=$BUILDPLATFORM gcr.io/distroless/base COPY --from=builder /app/main /