Mod outdated

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
pull/758/head
CrazyMax 3 years ago
parent 00cb53d0ef
commit df521e4e96
No known key found for this signature in database
GPG Key ID: 3248E46B6BB8C7F7

@ -53,4 +53,7 @@ docs:
authors:
$(BUILDX_CMD) bake update-authors
mod-outdated:
$(BUILDX_CMD) bake mod-outdated
.PHONY: shell binaries binaries-cross install release validate-all lint validate-vendor validate-docs validate-authors vendor docs authors

@ -76,6 +76,13 @@ target "update-authors" {
output = ["."]
}
target "mod-outdated" {
inherits = ["_common"]
dockerfile = "./hack/dockerfiles/vendor.Dockerfile"
target = "outdated"
output = ["type=cacheonly"]
}
target "test" {
inherits = ["_common"]
target = "test-coverage"

@ -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

Loading…
Cancel
Save