Mod outdated

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2021-09-04 18:57:10 +02:00
parent 00cb53d0ef
commit df521e4e96
3 changed files with 21 additions and 2 deletions

View File

@ -2,9 +2,11 @@
ARG GO_VERSION=1.17.0
FROM golang:${GO_VERSION}-alpine AS vendored
RUN apk add --no-cache git rsync
FROM golang:${GO_VERSION}-alpine AS base
RUN apk add --no-cache git rsync
WORKDIR /src
FROM base AS vendored
RUN --mount=target=/context \
--mount=target=.,type=tmpfs \
--mount=target=/go/pkg/mod,type=cache <<EOT
@ -33,3 +35,10 @@ if [ -n "$(git status --porcelain -- go.mod go.sum vendor)" ]; then
exit 1
fi
EOT
FROM psampaz/go-mod-outdated:v0.8.0 AS go-mod-outdated
FROM base AS outdated
RUN --mount=target=.,ro \
--mount=target=/go/pkg/mod,type=cache \
--mount=from=go-mod-outdated,source=/home/go-mod-outdated,target=/usr/bin/go-mod-outdated \
go list -mod=readonly -u -m -json all | go-mod-outdated -update -direct