From 2095c735b8a9ac7451020a806bbf2775a6bea9fe Mon Sep 17 00:00:00 2001 From: phm07 <22707808+phm07@users.noreply.github.com> Date: Mon, 30 Sep 2024 14:00:23 +0200 Subject: [PATCH] ci: build and test with Go 1.23 --- .github/workflows/build.yml | 5 ++++- .github/workflows/lint.yml | 9 ++++++--- .github/workflows/release.yml | 5 ++++- .github/workflows/test.yml | 7 +++++-- go.mod | 2 +- 5 files changed, 20 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 569864e9..ac47c9af 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,6 +10,9 @@ on: push: branches: [main] +env: + GOTOOLCHAIN: local + jobs: build: runs-on: ubuntu-latest @@ -20,7 +23,7 @@ jobs: - uses: actions/setup-go@v5 with: - go-version-file: go.mod + go-version: "1.23" - uses: goreleaser/goreleaser-action@v6 with: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index e7dd51c2..3bd19c7a 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -5,6 +5,9 @@ on: branches: [main] pull_request: +env: + GOTOOLCHAIN: local + permissions: contents: read @@ -15,7 +18,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: - go-version-file: go.mod + go-version: "1.23" - uses: golangci/golangci-lint-action@v6 with: @@ -27,7 +30,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: - go-version-file: go.mod + go-version: "1.23" - run: go mod tidy @@ -42,7 +45,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: - go-version-file: go.mod + go-version: "1.23" - run: make generate diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 26b33e5e..bfe6b13e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,6 +10,9 @@ on: push: tags: [v*] +env: + GOTOOLCHAIN: local + jobs: release: runs-on: ubuntu-latest @@ -20,7 +23,7 @@ jobs: - uses: actions/setup-go@v5 with: - go-version-file: go.mod + go-version: "1.23" - name: Import GPG key id: import_gpg diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5efbe8d4..3c70604b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,6 +5,9 @@ on: branches: [main] pull_request: +env: + GOTOOLCHAIN: local + permissions: contents: read @@ -24,7 +27,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: - go-version-file: go.mod + go-version: "1.23" - run: make test @@ -49,7 +52,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: - go-version-file: go.mod + go-version: "1.23" - uses: hetznercloud/tps-action@main diff --git a/go.mod b/go.mod index 5b68410e..c0255e5d 100644 --- a/go.mod +++ b/go.mod @@ -2,7 +2,7 @@ module github.com/hetznercloud/packer-plugin-hcloud go 1.21.0 -toolchain go1.22.7 +toolchain go1.23.1 require ( github.com/hashicorp/hcl/v2 v2.22.0