File tree Expand file tree Collapse file tree 3 files changed +12
-4
lines changed
Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 1111jobs :
1212 build-and-push-image :
1313 runs-on : ubuntu-latest
14+ strategy :
15+ fail-fast : false
16+ matrix :
17+ platform :
18+ - linux/amd64
19+ - linux/arm64
1420 permissions :
1521 contents : read
1622 packages : write
3642 with :
3743 context : .
3844 push : true
45+ platforms : ${{ matrix.platforms }}
3946 tags : ${{ steps.meta.outputs.tags }}
4047 labels : ${{ steps.meta.outputs.labels }}
4148 - name : Generate artifact attestation
Original file line number Diff line number Diff line change @@ -16,10 +16,10 @@ jobs:
1616 with :
1717 fetch-depth : 0 # See: https://goreleaser.com/ci/actions/
1818
19- - name : Set up Go 1.22.4
19+ - name : Set up Go 1.23
2020 uses : actions/setup-go@v2
2121 with :
22- go-version : 1.22
22+ go-version : 1.23
2323 id : go
2424
2525 - name : Run GoReleaser
Original file line number Diff line number Diff line change 1- FROM golang:1.23-alpine3.20 AS builder
1+ FROM --platform=$BUILDPLATFORM golang:1.23-alpine3.20 AS builder
2+ ARG TARGETOS TARGETARCH
23
34RUN mkdir /app && mkdir -p /usr/local/src/smolgit
45WORKDIR /usr/local/src/smolgit
@@ -7,7 +8,7 @@ ADD ./go.mod ./go.sum ./
78RUN go mod download
89ADD . ./
910
10- RUN go build -v -o /build/smolgit
11+ RUN GOOS=$TARGETOS GOARCH=$TARGETARCH go build -v -o /build/smolgit
1112
1213FROM alpine/git:2.45.2 AS runner
1314
You can’t perform that action at this time.
0 commit comments