From 24ef09cb8b41e5a67ae6c837e3f3b60c8cca5489 Mon Sep 17 00:00:00 2001 From: Hidetake Iwata Date: Sat, 9 Nov 2024 22:23:24 +0900 Subject: [PATCH] Use toolchain version of go.mod (#214) --- .github/workflows/go.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/go.yaml b/.github/workflows/go.yaml index 868e16d..9145027 100644 --- a/.github/workflows/go.yaml +++ b/.github/workflows/go.yaml @@ -22,9 +22,11 @@ jobs: timeout-minutes: 10 steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - id: toolchain + run: echo "version=$(sed -ne '/^toolchain /s/^toolchain go//p' go.mod)" >> "$GITHUB_OUTPUT" - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 with: - go-version: 1.23.3 + go-version: ${{ steps.toolchain.outputs.version }} cache-dependency-path: go.sum - run: go test -v -race ./... @@ -44,9 +46,11 @@ jobs: timeout-minutes: 10 steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - id: toolchain + run: echo "version=$(sed -ne '/^toolchain /s/^toolchain go//p' go.mod)" >> "$GITHUB_OUTPUT" - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 with: - go-version: 1.23.3 + go-version: ${{ steps.toolchain.outputs.version }} cache-dependency-path: go.sum - run: go mod tidy - uses: int128/update-generated-files-action@757376506709ed3d87f14a80ca28a98736d52236 # v2.55.0