try to add version

This commit is contained in:
Seraphim Strub 2023-04-23 01:05:35 +02:00
parent a3349fe7b1
commit ec1462cfef
2 changed files with 6 additions and 1 deletions

View file

@ -9,7 +9,7 @@ WORKDIR /app
ADD . /app/
RUN go build -ldflags "-s -w -extldflags '-static'" -o /main ./cmd/${GO_CMD}/
RUN go build -ldflags "-X main.release=$(git rev-parse --short HEAD) -s -w -extldflags '-static'" -o /main ./cmd/${GO_CMD}/
FROM scratch
COPY --chown=65534:0 --from=builder /main /