-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Dockerfile
34 lines (23 loc) · 1019 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
FROM --platform=$BUILDPLATFORM golang:1.23.3 AS build-env
ARG VERSION
ARG TARGETOS
ARG TARGETARCH
ENV CGO_ENABLED=0
WORKDIR /src
COPY . .
RUN GOOS=$TARGETOS GOARCH=$TARGETARCH \
go build -ldflags="-X 'main.version=${VERSION}'"
FROM ghcr.io/mgechev/revive:1.5.1
LABEL repository="https://github.com/morphy2k/revive-action"
LABEL homepage="https://github.com/morphy2k/revive-action"
LABEL maintainer="Markus Wiegand <[email protected]>"
LABEL org.opencontainers.image.title="Revive Action"
LABEL org.opencontainers.image.source="https://github.com/morphy2k/revive-action"
LABEL org.opencontainers.image.description="GitHub Action that runs Revive on your Go code"
LABEL org.opencontainers.image.licenses=MIT
LABEL com.github.actions.name="Revive Action"
LABEL com.github.actions.description="GitHub Action that runs Revive on your Go code"
LABEL com.github.actions.icon="code"
LABEL com.github.actions.color="blue"
COPY --from=build-env ["/src/revive-action", "/revive-action"]
ENTRYPOINT ["/revive-action"]