Skip to content

Commit f63bc0c

Browse files
committed
actions: use go-version-file: .go-version
see actions/setup-go#295
1 parent fb58303 commit f63bc0c

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

.github/workflows/Periodic-CI.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,12 @@ jobs:
7474
timeout-minutes: 15
7575
steps:
7676
- name: Check out the repo
77-
uses: actions/checkout@v2
78-
79-
- name: Fetch Go version from .go-version
80-
run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
77+
uses: actions/checkout@v3
8178

8279
- name: Set up Go
83-
uses: actions/setup-go@v2
80+
uses: actions/setup-go@v3
8481
with:
85-
go-version: ${{ env.GO_VERSION }}
82+
go-version-file: .go-version
8683

8784
- name: Fetch OPA version
8885
run: echo "OPA_VERSION=$(go list -m -f {{.Version}} github.com/open-policy-agent/opa | sed 's/v//')" >> $GITHUB_ENV

.github/workflows/unit-test.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,10 @@ jobs:
109109
timeout-minutes: 15
110110
steps:
111111
- name: Check out the repo
112-
uses: actions/checkout@v2
113-
- name: Fetch Go version from .go-version
114-
run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
112+
uses: actions/checkout@v3
115113
- uses: actions/setup-go@v3
116114
with:
117-
go-version: ${{ env.GO_VERSION }}
115+
go-version-file: .go-version
118116
- name: Check out the repo
119117
uses: actions/checkout@v3
120118
with:

0 commit comments

Comments
 (0)