File tree Expand file tree Collapse file tree 2 files changed +19
-3
lines changed
Expand file tree Collapse file tree 2 files changed +19
-3
lines changed Original file line number Diff line number Diff line change 1313
1414permissions :
1515 contents : write
16+ packages : write
1617
1718jobs :
1819 goreleaser :
2324 with :
2425 fetch-depth : 0
2526 - run : git fetch --force --tags
27+ - name : Set up QEMU
28+ uses : docker/setup-qemu-action@v3
29+ with :
30+ platforms : arm64
31+ - name : Set up Docker Buildx
32+ uses : docker/setup-buildx-action@v3
33+ with :
34+ driver : docker-container
2635 - name : Set up Go
2736 uses : actions/setup-go@v6
2837 with :
3342 with :
3443 gpg_private_key : ${{ secrets.GPG_PRIVATE_KEY }}
3544 passphrase : ${{ secrets.PASSPHRASE }}
45+ - name : Log in to GHCR
46+ uses : docker/login-action@v3
47+ with :
48+ registry : ghcr.io
49+ username : ${{ github.actor }}
50+ password : ${{ secrets.GITHUB_TOKEN }}
3651 - name : Run GoReleaser
3752 uses : goreleaser/goreleaser-action@v6
3853 with :
Original file line number Diff line number Diff line change 1- FROM golang:1.25-alpine3.21 as builder
2- RUN apk update && apk upgrade --available && sync
1+ FROM --platform=$BUILDPLATFORM golang:1.25-alpine3.21 AS builder
2+ ARG TARGETOS
3+ ARG TARGETARCH
34WORKDIR /app
45COPY . .
5- RUN CGO_ENABLED=0 go build -o /app/fsb -ldflags="-w -s" ./cmd/fsb
6+ RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -o /app/fsb -ldflags="-w -s" ./cmd/fsb
67
78FROM scratch
89COPY --from=builder /app/fsb /app/fsb
You can’t perform that action at this time.
0 commit comments