dockerfiles: formatting

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax 2022-07-20 16:44:31 +02:00
parent b066451b40
commit 0e17e54091
No known key found for this signature in database
GPG key ID: 3248E46B6BB8C7F7
4 changed files with 42 additions and 42 deletions

View file

@ -9,8 +9,8 @@ RUN apk add --no-cache git gpg
FROM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS gitvalidation
ARG GIT_VALIDATION_VERSION=v1.1.0
RUN --mount=type=cache,target=/root/.cache \
--mount=type=cache,target=/go/pkg/mod \
GOBIN=/out go install "github.com/vbatts/git-validation@${GIT_VALIDATION_VERSION}"
--mount=type=cache,target=/go/pkg/mod \
GOBIN=/out go install "github.com/vbatts/git-validation@${GIT_VALIDATION_VERSION}"
FROM base AS validate
ARG COMMIT_RANGE
@ -18,6 +18,6 @@ RUN if [ -z "$COMMIT_RANGE" ]; then echo "COMMIT_RANGE required" && exit 1; fi
ENV GIT_CHECK_EXCLUDE="./vendor"
WORKDIR /src
RUN --mount=type=bind,target=. \
--mount=type=cache,target=/root/.cache \
--mount=from=gitvalidation,source=/out/git-validation,target=/usr/bin/git-validation \
git-validation -q -range "$COMMIT_RANGE" -run short-subject,dangling-whitespace
--mount=type=cache,target=/root/.cache \
--mount=from=gitvalidation,source=/out/git-validation,target=/usr/bin/git-validation \
git-validation -q -range "${COMMIT_RANGE}" -run short-subject,dangling-whitespace