From 55e91b39e407bde9b6137b8555ede1850e91dac4 Mon Sep 17 00:00:00 2001 From: CrazyMax <1951866+crazy-max@users.noreply.github.com> Date: Sat, 23 Dec 2023 14:41:23 +0100 Subject: [PATCH] chore: use no-cache-filter for outdated stage Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com> --- docker-bake.hcl | 6 +----- dockerfiles/vendor.Dockerfile | 1 - 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/docker-bake.hcl b/docker-bake.hcl index 0587572a..e5710acd 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -39,11 +39,7 @@ target "update-vendor" { target "mod-outdated" { dockerfile = "./dockerfiles/vendor.Dockerfile" target = "outdated" - args = { - // used to invalidate cache for outdated run stage - // can be dropped when https://github.com/moby/buildkit/issues/1213 fixed - _RANDOM = uuidv4() - } + no-cache-filter = ["outdated"] output = ["type=cacheonly"] } diff --git a/dockerfiles/vendor.Dockerfile b/dockerfiles/vendor.Dockerfile index c325839a..a3fe9cd2 100644 --- a/dockerfiles/vendor.Dockerfile +++ b/dockerfiles/vendor.Dockerfile @@ -40,7 +40,6 @@ EOT FROM psampaz/go-mod-outdated:${MODOUTDATED_VERSION} AS go-mod-outdated FROM base AS outdated -ARG _RANDOM 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 \