Skip to content

Commit 22b4d5b

Browse files
committed
chore: gha job to derive go version from go.mod
1 parent 1fcce45 commit 22b4d5b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.github/workflows/go.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- name: Set up Go 1.x
2121
uses: actions/setup-go@v5
2222
with:
23-
go-version: 1.21.x
23+
go-version-file: "go.mod"
2424

2525
- name: Test
2626
run: |
@@ -47,7 +47,7 @@ jobs:
4747
- name: Set up Go 1.x
4848
uses: actions/setup-go@v5
4949
with:
50-
go-version: 1.21.x
50+
go-version-file: "go.mod"
5151

5252
- name: golangci-lint
5353
uses: golangci/golangci-lint-action@v6
@@ -101,7 +101,7 @@ jobs:
101101
- name: Set up Go 1.x
102102
uses: actions/setup-go@v5
103103
with:
104-
go-version: 1.21.x
104+
go-version-file: "go.mod"
105105

106106
- name: Install dependency required for linux builds
107107
if: matrix.os == 'ubuntu-20.04'

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
- name: Set up Go 1.x
3333
uses: actions/setup-go@v5
3434
with:
35-
go-version: 1.21.x
35+
go-version-file: "go.mod"
3636

3737
- name: Install dependency required for linux builds
3838
if: matrix.os == 'ubuntu-20.04'

0 commit comments

Comments
 (0)