-
-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (27 loc) · 1019 Bytes
/
Dockerfile
File metadata and controls
38 lines (27 loc) · 1019 Bytes
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
37
38
FROM golang:1.26.1-alpine AS builder
RUN apk add --no-cache git make gcc musl-dev
WORKDIR /app
# This step is done separately than `COPY . /app/` in order to
# cache dependencies.
COPY go.mod go.sum Makefile /app/
RUN go mod download
COPY . /app/
# Fix git ownership issue
RUN git config --global --add safe.directory /app
RUN make build/docker
FROM alpine:3.23
LABEL repository="https://github.com/aevea/commitsar"
LABEL homepage="https://github.com/aevea/commitsar"
LABEL maintainer="Simon Prochazka <simon@fallion.net>"
LABEL com.github.actions.name="Commitsar Action"
LABEL com.github.actions.description="Check commit message compliance with conventional commits"
LABEL com.github.actions.icon="code"
LABEL com.github.actions.color="blue"
RUN apk add --no-cache ca-certificates git
WORKDIR /app
COPY --from=builder /app/build/commitsar ./commitsar
COPY entrypoint.sh /entrypoint.sh
RUN ln -s $PWD/commitsar /usr/local/bin && \
chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
CMD ["commitsar"]