From 4737b1714fdc1eb7a1cbe68461b996e8062992da Mon Sep 17 00:00:00 2001 From: Chun-Hung Tseng Date: Wed, 15 May 2024 22:16:55 +0200 Subject: [PATCH] Bump go from 1.21.8 to 1.22.3 Introduce .go-version to align with other etcd-io repo Signed-off-by: Chun-Hung Tseng --- .github/workflows/golangci-lint.yml | 7 +++++-- .github/workflows/tests.yml | 6 ++++-- .go-version | 1 + go.mod | 4 +++- 4 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 .go-version diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index bba2a01..07befd0 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -17,9 +17,12 @@ jobs: name: lint runs-on: ubuntu-latest steps: - - uses: actions/setup-go@v5 + - uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5 + - id: goversion + run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT" + - uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 with: - go-version: 1.21.8 + go-version: ${{ steps.goversion.outputs.goversion }} - uses: actions/checkout@v4 - name: golangci-lint uses: golangci/golangci-lint-action@v6 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 79b5d39..bf838c8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -17,9 +17,11 @@ jobs: name: lint runs-on: ubuntu-latest steps: - - uses: actions/setup-go@v5 + - id: goversion + run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT" + - uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 with: - go-version: 1.21.8 + go-version: ${{ steps.goversion.outputs.goversion }} - uses: actions/checkout@v4 - name: tests run: | diff --git a/.go-version b/.go-version new file mode 100644 index 0000000..89144db --- /dev/null +++ b/.go-version @@ -0,0 +1 @@ +1.22.3 diff --git a/go.mod b/go.mod index 73dc63f..325d264 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,8 @@ module go.etcd.io/gofail -go 1.21 +go 1.22 + +toolchain go1.22.3 require github.com/stretchr/testify v1.9.0