From b90451c16b693a1159ad846ad71129fe07002f0e Mon Sep 17 00:00:00 2001 From: David Grove Date: Thu, 18 Apr 2024 18:11:07 -0400 Subject: [PATCH] Get go version for setup-go action from go.mod file --- .github/workflows/component_tests.yaml | 2 +- .github/workflows/e2e_tests.yaml | 2 +- .github/workflows/mnist-job-test-image.yml | 2 +- .github/workflows/olm_tests.yaml | 2 +- .github/workflows/operator-image.yml | 2 +- .github/workflows/precommit.yml | 2 +- .github/workflows/tag-and-build.yml | 2 +- .github/workflows/unit_tests.yml | 2 +- .github/workflows/verify_generated_files.yml | 4 ++-- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/component_tests.yaml b/.github/workflows/component_tests.yaml index 815025b2..8f5bf7a6 100644 --- a/.github/workflows/component_tests.yaml +++ b/.github/workflows/component_tests.yaml @@ -36,7 +36,7 @@ jobs: - name: Set Go uses: actions/setup-go@v5 with: - go-version: v1.20 + go-version-file: './go.mod' - name: Run component tests run: | diff --git a/.github/workflows/e2e_tests.yaml b/.github/workflows/e2e_tests.yaml index 30ef1ea9..0a0ad397 100644 --- a/.github/workflows/e2e_tests.yaml +++ b/.github/workflows/e2e_tests.yaml @@ -45,7 +45,7 @@ jobs: - name: Set Go uses: actions/setup-go@v5 with: - go-version: v1.20 + go-version-file: './go.mod' - name: Set up gotestfmt uses: gotesttools/gotestfmt-action@v2 diff --git a/.github/workflows/mnist-job-test-image.yml b/.github/workflows/mnist-job-test-image.yml index 4323bd5d..02c4b5c7 100644 --- a/.github/workflows/mnist-job-test-image.yml +++ b/.github/workflows/mnist-job-test-image.yml @@ -19,7 +19,7 @@ jobs: - name: Set Go uses: actions/setup-go@v5 with: - go-version: v1.20 + go-version-file: './go.mod' - name: Login to Quay.io id: podman-login-quay diff --git a/.github/workflows/olm_tests.yaml b/.github/workflows/olm_tests.yaml index 472eda20..abce29d3 100644 --- a/.github/workflows/olm_tests.yaml +++ b/.github/workflows/olm_tests.yaml @@ -44,7 +44,7 @@ jobs: - name: Set Go uses: actions/setup-go@v5 with: - go-version: v1.20 + go-version-file: './go.mod' - name: Set up gotestfmt uses: gotesttools/gotestfmt-action@v2 diff --git a/.github/workflows/operator-image.yml b/.github/workflows/operator-image.yml index 8c30a8c1..0713d36c 100644 --- a/.github/workflows/operator-image.yml +++ b/.github/workflows/operator-image.yml @@ -22,7 +22,7 @@ jobs: - name: Set Go uses: actions/setup-go@v5 with: - go-version: v1.20 + go-version-file: './go.mod' - name: Login to Quay.io id: podman-login-quay diff --git a/.github/workflows/precommit.yml b/.github/workflows/precommit.yml index 2ca5869c..267d537a 100644 --- a/.github/workflows/precommit.yml +++ b/.github/workflows/precommit.yml @@ -26,7 +26,7 @@ jobs: - name: Set Go uses: actions/setup-go@v5 with: - go-version: v1.20 + go-version-file: './go.mod' - name: Activate cache uses: actions/cache@v4 diff --git a/.github/workflows/tag-and-build.yml b/.github/workflows/tag-and-build.yml index a60dceb7..dc4a07a2 100644 --- a/.github/workflows/tag-and-build.yml +++ b/.github/workflows/tag-and-build.yml @@ -56,7 +56,7 @@ jobs: - name: Set Go uses: actions/setup-go@v5 with: - go-version: v1.20 + go-version-file: './go.mod' - name: Verify that release doesn't exist yet shell: bash {0} diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index 747cee03..b8e39f08 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -27,7 +27,7 @@ jobs: - name: Set Go uses: actions/setup-go@v5 with: - go-version: v1.20 + go-version-file: './go.mod' - name: Activate cache uses: actions/cache@v4 diff --git a/.github/workflows/verify_generated_files.yml b/.github/workflows/verify_generated_files.yml index 9027c1aa..a5f6eb38 100644 --- a/.github/workflows/verify_generated_files.yml +++ b/.github/workflows/verify_generated_files.yml @@ -24,7 +24,7 @@ jobs: - name: Set Go uses: actions/setup-go@v5 with: - go-version: v1.20 + go-version-file: './go.mod' - name: Verify that imports are organized run: make verify-imports @@ -35,6 +35,6 @@ jobs: - name: Set Go uses: actions/setup-go@v5 with: - go-version: v1.20 + go-version-file: './go.mod' - name: Verify that the latest WebhookConfigurations, ClusterRoles, and CustomResourceDefinitions have been generated run: make manifests && git diff --exit-code