From db4dcafa82eb8de2bc08757f22e31f719dfbc744 Mon Sep 17 00:00:00 2001 From: yxxhero <11087727+yxxhero@users.noreply.github.com> Date: Mon, 4 Sep 2023 21:42:33 -0500 Subject: [PATCH] feat: use go-version-file: go.mod for go version detecting (#2694) Signed-off-by: yxxhero --- .github/workflows/ci.yml | 7 ++----- .github/workflows/compatibility-e2e.yml | 3 +-- .github/workflows/e2e.yml | 3 +-- .github/workflows/lint.yml | 2 +- .github/workflows/release.yml | 2 +- 5 files changed, 6 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c4ab017c724..f09366f96fd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,9 +10,6 @@ on: schedule: - cron: '0 4 * * *' -env: - GO_VERSION: '1.20' - jobs: test: name: Test @@ -27,7 +24,7 @@ jobs: - name: Install Go uses: actions/setup-go@v4 with: - go-version: ${{ env.GO_VERSION }} + go-version-file: go.mod - name: Build manager console assets run: |- @@ -68,7 +65,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v4 with: - go-version: ${{ env.GO_VERSION }} + go-version-file: go.mod - name: Setup QEMU uses: docker/setup-qemu-action@v2 diff --git a/.github/workflows/compatibility-e2e.yml b/.github/workflows/compatibility-e2e.yml index 51b0ffc46d1..7c6165998a2 100644 --- a/.github/workflows/compatibility-e2e.yml +++ b/.github/workflows/compatibility-e2e.yml @@ -11,7 +11,6 @@ on: - cron: '0 4 * * *' env: - GO_VERSION: '1.20' KIND_VERSION: v0.12.0 CONTAINERD_VERSION: v1.5.2 KIND_CONFIG_PATH: test/testdata/kind/config.yaml @@ -54,7 +53,7 @@ jobs: - name: Install Go uses: actions/setup-go@v4 with: - go-version: ${{ env.GO_VERSION }} + go-version-file: go.mod - name: Get dependencies run: | diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 91bc2390aae..f20915d7641 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -11,7 +11,6 @@ on: - cron: '0 4 * * *' env: - GO_VERSION: '1.20' KIND_VERSION: v0.12.0 CONTAINERD_VERSION: v1.5.2 KIND_CONFIG_PATH: test/testdata/kind/config.yaml @@ -69,7 +68,7 @@ jobs: - name: Install Go uses: actions/setup-go@v4 with: - go-version: ${{ env.GO_VERSION }} + go-version-file: go.mod - name: Get dependencies run: | diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index f563f2ed9f6..5abe8512e07 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -20,7 +20,7 @@ jobs: - uses: actions/setup-go@v4 with: - go-version: '1.20' + go-version-file: go.mod cache: false - name: Golangci lint diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index db7cf495a45..b1d42ec8c13 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,7 +19,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v4 with: - go-version: '1.20' + go-version-file: go.mod - name: Check GoReleaser config uses: goreleaser/goreleaser-action@v4