mirror of
https://github.com/moby/buildkit.git
synced 2026-11-06 05:16:45 +00:00
hack: switch to gomod-updates
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
3 files changed
+9
-13
No files matched your search
@@ -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
@@ -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"]
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
Reference in new issue
Block a user