File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 1919 contents : read
2020 packages : write
2121 id-token : write
22- strategy :
23- matrix :
24- platform :
25- - linux/amd64
26- - linux/arm64
2722
2823 steps :
2924 - name : Checkout repository
3530 with :
3631 cosign-release : " v2.2.4"
3732
33+ # Set up QEMU for multi-arch builds
34+ - name : Set up QEMU
35+ uses : docker/setup-qemu-action@v3
36+
3837 - name : Set up Docker Buildx
3938 uses : docker/setup-buildx-action@v3
4039
5756 uses : docker/build-push-action@v5
5857 with :
5958 context : .
59+ platforms : linux/amd64,linux/arm64
6060 push : ${{ github.event_name != 'pull_request' }}
6161 tags : ${{ steps.meta.outputs.tags }}
6262 labels : ${{ steps.meta.outputs.labels }}
Original file line number Diff line number Diff line change @@ -11,10 +11,12 @@ RUN npm run build
1111# Stage 2: Build Backend
1212FROM golang:1.23-alpine AS backend-builder
1313WORKDIR /app
14+ RUN apk add --no-cache git
1415COPY go.mod go.sum ./
1516RUN go mod download
1617COPY . .
17- RUN CGO_ENABLED=0 GOOS=linux go build -o server cmd/main.go
18+ ARG TARGETARCH
19+ RUN CGO_ENABLED=0 GOOS=linux GOARCH=$TARGETARCH go build -o server cmd/main.go
1820
1921# Stage 3: Final Image
2022FROM alpine:latest
You can’t perform that action at this time.
0 commit comments