From f63bc0c262d4a756898a6d1a67812e9b2b6c553b Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Wed, 30 Nov 2022 11:05:00 +0000 Subject: [PATCH] actions: use go-version-file: .go-version see https://github.com/actions/setup-go/pull/295 --- .github/workflows/Periodic-CI.yml | 9 +++------ .github/workflows/unit-test.yml | 6 ++---- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/.github/workflows/Periodic-CI.yml b/.github/workflows/Periodic-CI.yml index 6c7d8b6469..8aaaa76ced 100644 --- a/.github/workflows/Periodic-CI.yml +++ b/.github/workflows/Periodic-CI.yml @@ -74,15 +74,12 @@ jobs: timeout-minutes: 15 steps: - name: Check out the repo - uses: actions/checkout@v2 - - - name: Fetch Go version from .go-version - run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV + uses: actions/checkout@v3 - name: Set up Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v3 with: - go-version: ${{ env.GO_VERSION }} + go-version-file: .go-version - name: Fetch OPA version run: echo "OPA_VERSION=$(go list -m -f {{.Version}} github.com/open-policy-agent/opa | sed 's/v//')" >> $GITHUB_ENV diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index f79f5951ab..6f153f1d8f 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -109,12 +109,10 @@ jobs: timeout-minutes: 15 steps: - name: Check out the repo - uses: actions/checkout@v2 - - name: Fetch Go version from .go-version - run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV + uses: actions/checkout@v3 - uses: actions/setup-go@v3 with: - go-version: ${{ env.GO_VERSION }} + go-version-file: .go-version - name: Check out the repo uses: actions/checkout@v3 with: