From d5e90a736cc96d6af614f8e3449852f85c1e6dee Mon Sep 17 00:00:00 2001 From: Tommy Xiao Date: Mon, 21 Oct 2024 19:02:58 +0800 Subject: [PATCH] fix: clean go version validate logic --- .github/workflows/builder-arm64.yaml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/testing.yml | 2 +- hack/validate | 6 ------ 4 files changed, 3 insertions(+), 9 deletions(-) diff --git a/.github/workflows/builder-arm64.yaml b/.github/workflows/builder-arm64.yaml index 52493ac5..102c9e5c 100644 --- a/.github/workflows/builder-arm64.yaml +++ b/.github/workflows/builder-arm64.yaml @@ -20,7 +20,7 @@ jobs: - uses: actions/checkout@master - uses: actions/setup-go@v4 with: - go-version: '1.22.5' + go-version: '1.22' cache-dependency-path: subdir/go.sum - name: generate resources run: mkdir -p {build/data,build/static} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f42fe5ff..e775b5d1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,7 +20,7 @@ jobs: - uses: actions/checkout@master - uses: actions/setup-go@v4 with: - go-version: '1.22.5' + go-version: '1.22' cache-dependency-path: subdir/go.sum - name: check depends run: sudo apt-get install -y libseccomp-dev diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 5188a4fb..3f51754b 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -21,7 +21,7 @@ jobs: ref: 'dev' - uses: actions/setup-go@v4 with: - go-version: '1.22.5' + go-version: '1.22' cache-dependency-path: subdir/go.sum - name: generate resources run: | diff --git a/hack/validate b/hack/validate index 1c037166..f9b5ed17 100755 --- a/hack/validate +++ b/hack/validate @@ -20,12 +20,6 @@ if [ -n "$DIRTY" ]; then exit 1 fi -echo Running: go version -if ! go version | grep -s "go version ${VERSION_GOLANG} "; then - echo "Unexpected $(go version) - Kubernetes ${VERSION_K8S} should be built with go version ${VERSION_GOLANG}" - exit 1 -fi - echo Running: go mod verify go mod verify