Skip to content

Commit 00a3fa6

Browse files
authored
chore: use go-version-file instead of hard-coded Go version in GitHub Actions (#1353)
- Replace hard-coded go-version with go-version-file: 'go.mod' in all workflows - Move checkout action before setup-go where needed for go-version-file to work - Affects workflows: manual-releaser, release, run-tests, focused-test
1 parent 373814a commit 00a3fa6

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

.github/workflows/focused-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ jobs:
66
focused-test:
77
runs-on: ubuntu-latest
88
steps:
9+
- uses: actions/checkout@v6
910
- uses: actions/setup-go@v6
1011
with:
11-
go-version: '1.25.3'
12-
- uses: actions/checkout@v6
12+
go-version-file: 'go.mod'
1313
- run: go tool ginkgo unfocus && test -z "$(git status -s)"
1414

.github/workflows/manual-releaser.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Set up Go
1818
uses: actions/setup-go@v6
1919
with:
20-
go-version: '1.25.3'
20+
go-version-file: 'go.mod'
2121
- name: Run GoReleaser
2222
uses: goreleaser/goreleaser-action@v6
2323
with:

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Set up Go
1717
uses: actions/setup-go@v6
1818
with:
19-
go-version: '1.25.3'
19+
go-version-file: 'go.mod'
2020
- name: Run GoReleaser
2121
uses: goreleaser/goreleaser-action@v6
2222
with:

.github/workflows/run-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ jobs:
1717
outputs:
1818
pr_number: ${{ github.event.number }}
1919
steps:
20+
- uses: actions/checkout@v6
2021
- uses: actions/setup-go@v6
2122
with:
22-
go-version: '1.25.3'
23-
- uses: actions/checkout@v6
23+
go-version-file: 'go.mod'
2424
- run: make test
2525
call-dependabot-pr-workflow:
2626
needs: test

0 commit comments

Comments
 (0)