diff --git a/Makefile b/Makefile index c8e0de01..86236b1e 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/docker-bake.hcl b/docker-bake.hcl index a8502678..997bda20 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -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" diff --git a/hack/dockerfiles/vendor.Dockerfile b/hack/dockerfiles/vendor.Dockerfile index 967f9d58..7a44dccc 100644 --- a/hack/dockerfiles/vendor.Dockerfile +++ b/hack/dockerfiles/vendor.Dockerfile @@ -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 <