From d8b4a77c957fb7f3a9aaf601ae57b58e0f27a127 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=A5=96=E5=BB=BA?= Date: Wed, 10 Jul 2024 01:52:27 +0000 Subject: [PATCH] ci: run go mod tidy before building kubectl (#4274) Signed-off-by: zhangzujian --- .github/workflows/build-arm64-image.yaml | 1 + .github/workflows/build-x86-image.yaml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/build-arm64-image.yaml b/.github/workflows/build-arm64-image.yaml index d57d4da668f..65e00539eaf 100644 --- a/.github/workflows/build-arm64-image.yaml +++ b/.github/workflows/build-arm64-image.yaml @@ -92,6 +92,7 @@ jobs: cp -a $go_bin_dir/$bin `dirname "$dockerfile"` ;; kubectl) + go mod tidy version=`go list -m -f '{{.Version}}' k8s.io/kubernetes` mod_dir=`go list -m -f '{{.Dir}}' k8s.io/kubernetes` source "$mod_dir/hack/lib/util.sh" diff --git a/.github/workflows/build-x86-image.yaml b/.github/workflows/build-x86-image.yaml index 8d334d5d9c4..8b28bb77cb9 100644 --- a/.github/workflows/build-x86-image.yaml +++ b/.github/workflows/build-x86-image.yaml @@ -237,6 +237,7 @@ jobs: echo "COPY $bin /$f" >> "$dockerfile" ;; kubectl) + go mod tidy version=`go list -m -f '{{.Version}}' k8s.io/kubernetes` mod_dir=`go list -m -f '{{.Dir}}' k8s.io/kubernetes` source "$mod_dir/hack/lib/util.sh"