forked from morphy2k/revive-action
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
32 lines (21 loc) · 945 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
FROM golang:1.20.4 as build-env
ARG ACTION_VERSION=unknown
ARG REVIVE_VERSION=v1.3.2
ENV CGO_ENABLED=0
RUN go install -v -ldflags="-X 'main.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.18.0
LABEL repository="https://github.com/morphy2k/revive-action"
LABEL homepage="https://github.com/morphy2k/revive-action"
LABEL maintainer="Markus Wiegand <mail@morphy2k.dev>"
LABEL com.github.actions.name="Revive Action"
LABEL com.github.actions.description="Lint your Go code with Revive"
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"]