From 7bf7e7165ce5f603463ab7bbc0f623bff774aff0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20T=C3=B6lle?= Date: Fri, 15 Sep 2023 08:43:15 +0200 Subject: [PATCH] feat: build with Go 1.21 (#516) Also bump golangci-lint to v1.54.2. --- .github/workflows/ci.yml | 8 ++++---- .github/workflows/goreleaser.yml | 2 +- .github/workflows/test_e2e.yml | 2 +- .gitlab-ci.yml | 2 +- README.md | 2 +- go.mod | 2 +- hack/Dockerfile | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2fbe3f764..34683e60f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: steps: - uses: actions/setup-go@v4 with: - go-version: '1.20' + go-version: "1.21" - uses: actions/checkout@v4 - name: Run tests run: | @@ -26,13 +26,13 @@ jobs: steps: - uses: actions/setup-go@v4 with: - go-version: '1.20' + go-version: "1.21" - uses: actions/checkout@v4 - name: golangci-lint uses: golangci/golangci-lint-action@v3 with: # Required: the version of golangci-lint is required and must be specified without patch version - version: v1.53.3 + version: v1.54.2 # In general linting is quite fast with warm caches, but a fresh run might take some time. args: --timeout 5m @@ -42,7 +42,7 @@ jobs: steps: - uses: actions/setup-go@v4 with: - go-version: '1.20' + go-version: "1.21" - uses: actions/checkout@v4 - name: Check imports shell: bash diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml index acd5e1405..4179293e6 100644 --- a/.github/workflows/goreleaser.yml +++ b/.github/workflows/goreleaser.yml @@ -18,7 +18,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: "1.20" + go-version: "1.21" - name: Set up QEMU uses: docker/setup-qemu-action@v3 diff --git a/.github/workflows/test_e2e.yml b/.github/workflows/test_e2e.yml index c7cb9b237..727fe76f2 100644 --- a/.github/workflows/test_e2e.yml +++ b/.github/workflows/test_e2e.yml @@ -16,7 +16,7 @@ jobs: steps: - uses: actions/setup-go@v4 with: - go-version: '1.20' + go-version: "1.21" - uses: actions/checkout@master - uses: hetznercloud/tps-action@main with: diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 41cdbf212..467287a54 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -31,7 +31,7 @@ test:lint: test:unit: stage: test - image: golang:1.20 + image: golang:1.21 variables: NODE_NAME: "test" script: diff --git a/README.md b/README.md index 2fd8a1680..48b2c9cc6 100644 --- a/README.md +++ b/README.md @@ -217,7 +217,7 @@ that will be billed. 1x CPX21 (Ubuntu 18.04) -**Requirements: Docker and Go 1.20** +**Requirements: Docker and Go 1.21** 1. Configure your environment correctly diff --git a/go.mod b/go.mod index cfa72e40e..3074fcb5a 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/hetznercloud/hcloud-cloud-controller-manager -go 1.20 +go 1.21.1 require ( github.com/hetznercloud/hcloud-go/v2 v2.1.1 diff --git a/hack/Dockerfile b/hack/Dockerfile index 8ccd227a6..27f1dd07f 100644 --- a/hack/Dockerfile +++ b/hack/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.20 as builder +FROM golang:1.21 as builder WORKDIR /hccm ADD go.mod go.sum /hccm/ RUN go mod download