From c622f71e012f1e1f9211b8f0b1a07e19e3572e1e Mon Sep 17 00:00:00 2001 From: zhangzujian Date: Tue, 9 Jul 2024 14:31:00 +0000 Subject: [PATCH] ci: run go mod tidy before building kubectl 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 64f94ab86c5..4c45a26642c 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"