From df521e4e96db346cce7aed1613767f1d9099d081 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sat, 4 Sep 2021 18:57:10 +0200 Subject: [PATCH] Mod outdated Signed-off-by: CrazyMax --- Makefile | 3 +++ docker-bake.hcl | 7 +++++++ hack/dockerfiles/vendor.Dockerfile | 13 +++++++++++-- 3 files changed, 21 insertions(+), 2 deletions(-) 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 <