hack: switch to gomod-updates

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax committed 2026-05-13 13:52:17 +02:00
1 parent b8156be03c
commit f3c6fef9b6
3 files changed
+9 -13

No files matched your search

+3 -3
View File
@@ -125,6 +125,6 @@ docs:
docs-dockerfile:
$(BUILDX_CMD) bake docs-dockerfile
.PHONY: mod-outdated
mod-outdated:
$(BUILDX_CMD) bake mod-outdated
.PHONY: gomod-updates
gomod-updates:
$(BUILDX_CMD) bake gomod-updates
+3 -3
View File
@@ -428,11 +428,11 @@ target "docs-dockerfile" {
output = ["./frontend/dockerfile/docs/rules"]
}
target "mod-outdated" {
target "gomod-updates" {
inherits = ["_common"]
dockerfile = "./hack/dockerfiles/vendor.Dockerfile"
target = "outdated"
no-cache-filter = ["outdated"]
target = "gomod-updates"
no-cache-filter = ["gomod-updates"]
output = ["type=cacheonly"]
}
+3 -7
View File
@@ -2,7 +2,6 @@
ARG GO_VERSION=1.26
ARG ALPINE_VERSION=3.23
ARG MODOUTDATED_VERSION=v0.9.0
FROM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS base
RUN apk add --no-cache git rsync
@@ -38,11 +37,8 @@ RUN --mount=target=/context \
fi
EOT
FROM --platform=linux/amd64 psampaz/go-mod-outdated:${MODOUTDATED_VERSION} AS go-mod-outdated-amd64
FROM go-mod-outdated-amd64 AS go-mod-outdated
FROM base AS outdated
FROM base AS gomod-updates
RUN --mount=target=.,rw \
--mount=target=/go/pkg/mod,type=cache \
--mount=from=go-mod-outdated,source=/usr/bin/go-mod-outdated,target=/usr/bin/go-mod-outdated \
go list -mod=mod -u -m -json all | go-mod-outdated -update -direct
--mount=from=crazymax/gomod-updates,source=/usr/bin/gomod-updates,target=/usr/bin/gomod-updates \
gomod-updates --update --direct --major