Skip to content

Commit

Permalink
[8.6](backport #558) actions: use go-version-file: .go-version (#560)
Browse files Browse the repository at this point in the history
actions: use go-version-file: .go-version (#558)

(cherry picked from commit b2234cc)

Co-authored-by: Victor Martinez <victormartinezrubio@gmail.com>
  • Loading branch information
mergify[bot] and v1v committed Nov 30, 2022
1 parent 4b8125f commit eb55751
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/Periodic-CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,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:
Expand Down

0 comments on commit eb55751

Please sign in to comment.