Build for multiplatform

This commit is contained in:
2022-07-16 12:20:50 +01:00
parent c80f4dcc66
commit 10ac1d13b9
3 changed files with 4 additions and 3 deletions

View File

@@ -27,6 +27,7 @@ jobs:
uses: docker/build-push-action@v3
with:
push: true
platforms: linux/amd64,linux/arm64,linux/arm/v7
tags: |
ghcr.io/${{ github.repository_owner }}/aaisp-exporter:${{ github.ref_name }}
ghcr.io/${{ github.repository_owner }}/aaisp-exporter:latest

View File

@@ -22,7 +22,7 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
goversion: "https://dl.google.com/go/go1.18.1.linux-amd64.tar.gz"
goversion: "https://dl.google.com/go/go1.18.4.linux-amd64.tar.gz"
project_path: "./cmd/aaisp_exporter"
binary_name: "aaisp_exporter"
extra_files: LICENSE cmd/aaisp_exporter/README.md

View File

@@ -1,4 +1,4 @@
FROM golang:1.18.4-alpine3.15 as build
FROM golang:1.18.4-alpine3.16 as build
WORKDIR /build
COPY . .
RUN go get -d -v .
@@ -7,4 +7,4 @@ RUN go build -v ./cmd/aaisp_exporter
FROM alpine:3.16.0
WORKDIR /service
COPY --from=build /build/aaisp_exporter .
ENTRYPOINT ["./aaisp_exporter"]%
ENTRYPOINT ["./aaisp_exporter"]