diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 267763c11..8532e8aa4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,6 +3,9 @@ name: Build on: push: +env: + GOTOOLCHAIN: local + jobs: build: runs-on: ubuntu-latest @@ -13,7 +16,7 @@ jobs: - name: Set up Go 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/lint.yml b/.github/workflows/lint.yml index 1737787e9..ab645358f 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -5,6 +5,9 @@ on: branches: [main] pull_request: +env: + GOTOOLCHAIN: local + jobs: lint: runs-on: ubuntu-latest @@ -12,7 +15,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: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9fd70efc3..59f77fc85 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,6 +5,9 @@ on: tags: - "v*" +env: + GOTOOLCHAIN: local + jobs: release: runs-on: ubuntu-latest @@ -17,7 +20,7 @@ jobs: - name: Set up Go 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 795d9daf7..dc99e91a9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,6 +6,9 @@ on: pull_request: types: [opened, synchronize, reopened, ready_for_review] +env: + GOTOOLCHAIN: local + jobs: unit: runs-on: ubuntu-latest @@ -14,7 +17,7 @@ jobs: - uses: actions/setup-go@v5 with: - go-version-file: go.mod + go-version: "1.23" - run: go test -v -timeout=30s -parallel=8 -coverprofile=coverage.txt -coverpkg=./... ./... @@ -71,7 +74,7 @@ jobs: - uses: actions/setup-go@v5 with: - go-version-file: go.mod + go-version: "1.23" - uses: hetznercloud/tps-action@main diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 927c48ebe..2c06486dd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -22,7 +22,7 @@ cache: build: stage: build - image: golang:1.21 + image: golang:1.23 script: - go env - go mod download @@ -35,6 +35,6 @@ test:lint: test:unit: stage: test - image: golang:1.21 + image: golang:1.23 script: - make test diff --git a/go.mod b/go.mod index 8beffc0f9..5b1dcae7d 100644 --- a/go.mod +++ b/go.mod @@ -2,6 +2,8 @@ module github.com/hetznercloud/terraform-provider-hcloud go 1.21 +toolchain go1.23.1 + require ( github.com/google/go-cmp v0.6.0 github.com/hashicorp/go-cty v1.4.1-0.20200723130312-85980079f637