File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66 - ' *'
77
88jobs :
9- docker :
9+ build-and-push-image :
1010 runs-on : ubuntu-latest
11+ permissions :
12+ contents : read
13+ packages : write
1114 steps :
1215 - name : Checkout Repository
1316 uses : actions/checkout@v3
@@ -34,11 +37,12 @@ jobs:
3437 password : ${{ secrets.GITHUB_TOKEN }}
3538
3639 - name : Build and Push Docker Image
37- uses : docker/build-push-action@v3
40+ uses : docker/build-push-action@v6
3841 env :
3942 DOCKER_BUILDKIT : 1
4043 with :
4144 context : .
45+ platforms : linux/amd64,linux/arm64
4246 file : docker/Dockerfile
4347 push : true
4448 tags : ${{ steps.meta.outputs.tags }}
Original file line number Diff line number Diff line change 1- FROM golang:1.25 AS builder
1+ FROM --platform=$BUILDPLATFORM golang:1.25 AS builder
2+ ARG TARGETOS
3+ ARG TARGETARCH
24WORKDIR /opt/keepup/
3- COPY go.mod ./
4- COPY go.sum .
5- COPY src ./src
5+ COPY go.mod go.sum ./
6+ COPY src ./src/
67RUN go mod download
7- RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o helm-scraper src/main.go
8+ RUN CGO_ENABLED=0 \
9+ GOOS=$TARGETOS \
10+ GOARCH=$TARGETARCH \
11+ go build -a -installsuffix cgo -o helm-scraper src/main.go
812
9- FROM alpine:latest
13+ FROM alpine:3
1014WORKDIR /opt/keepup/
1115COPY --from=builder /opt/keepup/helm-scraper .
1216RUN chmod +x /opt/keepup/helm-scraper
13-
1417ENTRYPOINT ["/opt/keepup/helm-scraper" ]
You can’t perform that action at this time.
0 commit comments