add github action to push image (#21)

Co-authored-by: sh0rez <me@shorez.de>
This commit is contained in:
Jeroen Op 't Eynde 2021-06-04 22:10:06 +02:00 committed by GitHub
parent 5776ff829f
commit 4f0571d7e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 62 additions and 4 deletions

View file

@ -1,4 +1,4 @@
FROM golang:1.16.4 as base
FROM --platform=$BUILDPLATFORM golang:1.16.4 as base
ENV GO111MODULE=on
WORKDIR /app
@ -11,7 +11,9 @@ RUN go mod download
COPY . .
FROM base AS builder
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags='-s -w -extldflags "-static"' .
ENV GOARCH=$TARGETARCH
RUN CGO_ENABLED=0 go build -ldflags='-s -w -extldflags "-static"' .
FROM alpine:3.12
COPY --from=builder /app/docsonnet /usr/local/bin