Skip to content

Commit 98d4117

Browse files
authored
Merge pull request #412 from justinsb/github_actions_tie_to_go.mod
chore: get go version from go.mod
2 parents f9f4f9f + 44b9317 commit 98d4117

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

.github/workflows/main.yml

+7-9
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,12 @@ jobs:
1111
verify-goimports:
1212
runs-on: ubuntu-latest
1313
steps:
14+
- uses: actions/checkout@v2
15+
1416
- name: Set up go
1517
uses: actions/setup-go@v5
1618
with:
17-
go-version: '1.22'
18-
stable: true
19-
20-
- uses: actions/checkout@v2
19+
go-version-file: 'go.mod'
2120

2221
- name: verify-goimports
2322
run: dev/ci/presubmits/verify-goimports
@@ -26,13 +25,12 @@ jobs:
2625
verify-gomod:
2726
runs-on: ubuntu-latest
2827
steps:
28+
- uses: actions/checkout@v2
29+
2930
- name: Set up go
3031
uses: actions/setup-go@v5
3132
with:
32-
go-version: '1.22'
33-
stable: true
34-
35-
- uses: actions/checkout@v2
33+
go-version-file: 'go.mod'
3634

3735
- name: verify-gomod
3836
run: dev/ci/presubmits/verify-gomod
@@ -44,7 +42,7 @@ jobs:
4442
- uses: actions/checkout@v1
4543
- uses: actions/setup-go@v5
4644
with:
47-
go-version: '1.22'
45+
go-version-file: 'go.mod'
4846
- name: Install latest version of Kind
4947
run: |
5048
go get sigs.k8s.io/kind

0 commit comments

Comments
 (0)