Skip to content

Commit

Permalink
ci: multi-platform image
Browse files Browse the repository at this point in the history
  • Loading branch information
rornic committed May 3, 2024
1 parent 2e68d8f commit 16e267f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@ jobs:
uses: docker/build-push-action@v5
with:
push: false
platforms: linux/amd64,linux/arm64,linux/arm/v6
context: .
tags: ${{ steps.meta.outputs.tags }}
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM golang:1.22 as builder
FROM golang:1.22-alpine as builder

WORKDIR /app
COPY . .

RUN go mod download
RUN CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=6 go build -o bin/starling_exporter cmd/starling_exporter.go
RUN go build -o bin/starling_exporter cmd/starling_exporter.go

FROM scratch

Expand Down

0 comments on commit 16e267f

Please sign in to comment.