Skip to content

Commit ebba341

Browse files
author
Takuya Ueda
committed
Fix go version of workflow
1 parent ab43056 commit ebba341

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/testandvet.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,13 @@ jobs:
2525

2626
- name: Checkout code
2727
uses: actions/checkout@v4.2.2
28+
id: toolchain # see: https://github.com/actions/setup-go/issues/457#issuecomment-2480536859
29+
run: echo "version=$(sed -ne '/^toolchain /s/^toolchain go//p' go.mod)" >> "$GITHUB_OUTPUT"
2830

2931
- name: Install Go
3032
uses: actions/setup-go@v5.3.0
3133
with:
32-
go-version-file: 'go.mod'
34+
go-version: ${{ steps.toolchain.outputs.version }}
3335

3436
- name: Cache Go module and build cache
3537
uses: actions/cache@v4.2.2

0 commit comments

Comments
 (0)