1
0
mirror of https://github.com/distribution/distribution synced 2024-11-12 05:45:51 +01:00

Update lint.Dockerfile

Add a timeout to the lint:
By default it is set to 1m

Remove ARGs where not needed.

Signed-off-by: Milos Gajdos <milosthegajdos@gmail.com>
This commit is contained in:
Milos Gajdos 2024-10-26 18:36:41 +01:00
parent 3996413f46
commit bd52394e81
No known key found for this signature in database

@ -13,7 +13,9 @@ WORKDIR /src
FROM base
ENV GOFLAGS="-buildvcs=false"
ARG TIMEOUT="5m"
ARG BUILDTAGS
RUN --mount=type=bind,target=. \
--mount=type=cache,target=/root/.cache \
--mount=from=golangci-lint,source=/usr/bin/golangci-lint,target=/usr/bin/golangci-lint \
golangci-lint --build-tags "${BUILDTAGS}" run
golangci-lint --timeout "${TIMEOUT}" --build-tags "${BUILDTAGS}" run