-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Dockerfile
36 lines (24 loc) · 1.18 KB
/
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
35
36
FROM golang:1.23.2 AS build-env
ARG ACTION_VERSION=unknown
ARG REVIVE_VERSION=v1.4.0
ENV CGO_ENABLED=0
RUN go install -v -ldflags="-X 'github.com/mgechev/revive/cli.version=${REVIVE_VERSION}'" \
github.com/mgechev/revive@${REVIVE_VERSION}
WORKDIR /tmp/github.com/morphy2k/revive-action
COPY . .
RUN go install -ldflags="-X 'main.version=${ACTION_VERSION}'"
FROM alpine:3.20.3
LABEL repository="https://github.com/morphy2k/revive-action"
LABEL homepage="https://github.com/morphy2k/revive-action"
LABEL maintainer="Markus Wiegand <mail@morphy.dev>"
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 ["/go/bin/revive", "/go/bin/revive-action", "/bin/"]
COPY --from=build-env /tmp/github.com/morphy2k/revive-action/entrypoint.sh /
RUN apk add --no-cache bash gawk
ENTRYPOINT ["/entrypoint.sh"]