From 64d330790dbd87646e9b77463737e690685c04d6 Mon Sep 17 00:00:00 2001 From: Spencer Schrock Date: Wed, 7 Feb 2024 11:36:37 -0800 Subject: [PATCH] :seedling: Update Go toolchain to 1.22 (#3859) * update workflows to use go 1.22 Signed-off-by: Spencer Schrock * update tools go.mod to 1.22. no one imports this, so we can bump it now and avoid issues in the future where we need to upgrade. Signed-off-by: Spencer Schrock * bump docker files Signed-off-by: Spencer Schrock --------- Signed-off-by: Spencer Schrock --- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/docker.yml | 2 +- .github/workflows/gitlab.yml | 2 +- .github/workflows/goreleaser.yaml | 2 +- .github/workflows/integration.yml | 2 +- .github/workflows/lint.yml | 2 +- .github/workflows/main.yml | 2 +- .github/workflows/publishimage.yml | 2 +- .github/workflows/scdiff.yml | 2 +- .github/workflows/slsa-goreleaser.yml | 2 +- Dockerfile | 2 +- attestor/Dockerfile | 2 +- clients/githubrepo/roundtripper/tokens/server/Dockerfile | 2 +- cron/internal/bq/Dockerfile | 2 +- cron/internal/cii/Dockerfile | 2 +- cron/internal/controller/Dockerfile | 2 +- cron/internal/webhook/Dockerfile | 2 +- cron/internal/worker/Dockerfile | 2 +- tools/go.mod | 2 +- 19 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 787f424b..28167f1b 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -37,7 +37,7 @@ permissions: contents: read env: - GO_VERSION: 1.21 + GO_VERSION: 1.22 jobs: analyze: diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 25800fc9..d9f61506 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -23,7 +23,7 @@ on: - main env: - GO_VERSION: 1.21 + GO_VERSION: 1.22 jobs: docs_only_check: diff --git a/.github/workflows/gitlab.yml b/.github/workflows/gitlab.yml index 7742763d..a1fb9614 100644 --- a/.github/workflows/gitlab.yml +++ b/.github/workflows/gitlab.yml @@ -25,7 +25,7 @@ on: - main env: - GO_VERSION: 1.21 + GO_VERSION: 1.22 jobs: gitlab-integration-trusted: diff --git a/.github/workflows/goreleaser.yaml b/.github/workflows/goreleaser.yaml index 27269148..b80c0982 100644 --- a/.github/workflows/goreleaser.yaml +++ b/.github/workflows/goreleaser.yaml @@ -23,7 +23,7 @@ permissions: contents: read env: - GO_VERSION: 1.21 + GO_VERSION: 1.22 jobs: goreleaser: diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 9a373616..4fcd7007 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -24,7 +24,7 @@ permissions: contents: read env: - GO_VERSION: 1.21 + GO_VERSION: 1.22 jobs: approve: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index db07113c..f25c6e31 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -12,7 +12,7 @@ permissions: pull-requests: read # Use with `only-new-issues` option. env: - GO_VERSION: 1.21 + GO_VERSION: 1.22 jobs: golangci: diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3b4d6df6..e1dfeb3c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -27,7 +27,7 @@ on: env: PROTOC_VERSION: 21.6 - GO_VERSION: 1.21 + GO_VERSION: 1.22 jobs: unit-test: diff --git a/.github/workflows/publishimage.yml b/.github/workflows/publishimage.yml index 0d5c956e..6f4cce86 100644 --- a/.github/workflows/publishimage.yml +++ b/.github/workflows/publishimage.yml @@ -22,7 +22,7 @@ on: - main env: - GO_VERSION: 1.21 + GO_VERSION: 1.22 jobs: publishimage: diff --git a/.github/workflows/scdiff.yml b/.github/workflows/scdiff.yml index cc439933..6f2b7fbb 100644 --- a/.github/workflows/scdiff.yml +++ b/.github/workflows/scdiff.yml @@ -6,7 +6,7 @@ on: permissions: read-all env: - GO_VERSION: 1.21 + GO_VERSION: 1.22 jobs: share-link: diff --git a/.github/workflows/slsa-goreleaser.yml b/.github/workflows/slsa-goreleaser.yml index 6b584eb1..6f36dd02 100644 --- a/.github/workflows/slsa-goreleaser.yml +++ b/.github/workflows/slsa-goreleaser.yml @@ -8,7 +8,7 @@ on: permissions: read-all env: - GO_VERSION: 1.21 + GO_VERSION: 1.22 jobs: # Generate ldflags dynamically. diff --git a/Dockerfile b/Dockerfile index 0f9cbb4e..bea580e4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM golang:1.21.6@sha256:76aadd914a29a2ee7a6b0f3389bb2fdb87727291d688e1d972abe6c0fa6f2ee0 AS base +FROM golang:1.22.0@sha256:ef61a20960397f4d44b0e729298bf02327ca94f1519239ddc6d91689615b1367 AS base WORKDIR /src ENV CGO_ENABLED=0 COPY go.* ./ diff --git a/attestor/Dockerfile b/attestor/Dockerfile index 03a307dc..036dedaf 100644 --- a/attestor/Dockerfile +++ b/attestor/Dockerfile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM golang:1.21.6@sha256:76aadd914a29a2ee7a6b0f3389bb2fdb87727291d688e1d972abe6c0fa6f2ee0 AS base +FROM golang:1.22.0@sha256:ef61a20960397f4d44b0e729298bf02327ca94f1519239ddc6d91689615b1367 AS base WORKDIR /src/scorecard COPY . ./ diff --git a/clients/githubrepo/roundtripper/tokens/server/Dockerfile b/clients/githubrepo/roundtripper/tokens/server/Dockerfile index 0989db66..da7f0cec 100644 --- a/clients/githubrepo/roundtripper/tokens/server/Dockerfile +++ b/clients/githubrepo/roundtripper/tokens/server/Dockerfile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM golang:1.21.6@sha256:76aadd914a29a2ee7a6b0f3389bb2fdb87727291d688e1d972abe6c0fa6f2ee0 AS base +FROM golang:1.22.0@sha256:ef61a20960397f4d44b0e729298bf02327ca94f1519239ddc6d91689615b1367 AS base WORKDIR /src ENV CGO_ENABLED=0 COPY go.* ./ diff --git a/cron/internal/bq/Dockerfile b/cron/internal/bq/Dockerfile index f3ee60d0..c4bb9ec5 100644 --- a/cron/internal/bq/Dockerfile +++ b/cron/internal/bq/Dockerfile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM golang:1.21.6@sha256:76aadd914a29a2ee7a6b0f3389bb2fdb87727291d688e1d972abe6c0fa6f2ee0 AS base +FROM golang:1.22.0@sha256:ef61a20960397f4d44b0e729298bf02327ca94f1519239ddc6d91689615b1367 AS base WORKDIR /src ENV CGO_ENABLED=0 COPY go.* ./ diff --git a/cron/internal/cii/Dockerfile b/cron/internal/cii/Dockerfile index ba1516bf..feaf972d 100644 --- a/cron/internal/cii/Dockerfile +++ b/cron/internal/cii/Dockerfile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM golang:1.21.6@sha256:76aadd914a29a2ee7a6b0f3389bb2fdb87727291d688e1d972abe6c0fa6f2ee0 AS base +FROM golang:1.22.0@sha256:ef61a20960397f4d44b0e729298bf02327ca94f1519239ddc6d91689615b1367 AS base WORKDIR /src ENV CGO_ENABLED=0 COPY go.* ./ diff --git a/cron/internal/controller/Dockerfile b/cron/internal/controller/Dockerfile index 2d9a8148..dfa409ad 100644 --- a/cron/internal/controller/Dockerfile +++ b/cron/internal/controller/Dockerfile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM golang:1.21.6@sha256:76aadd914a29a2ee7a6b0f3389bb2fdb87727291d688e1d972abe6c0fa6f2ee0 AS base +FROM golang:1.22.0@sha256:ef61a20960397f4d44b0e729298bf02327ca94f1519239ddc6d91689615b1367 AS base WORKDIR /src ENV CGO_ENABLED=0 COPY go.* ./ diff --git a/cron/internal/webhook/Dockerfile b/cron/internal/webhook/Dockerfile index 2331d6b4..c6ccfc54 100644 --- a/cron/internal/webhook/Dockerfile +++ b/cron/internal/webhook/Dockerfile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM golang:1.21.6@sha256:76aadd914a29a2ee7a6b0f3389bb2fdb87727291d688e1d972abe6c0fa6f2ee0 AS base +FROM golang:1.22.0@sha256:ef61a20960397f4d44b0e729298bf02327ca94f1519239ddc6d91689615b1367 AS base WORKDIR /src ENV CGO_ENABLED=0 COPY go.* ./ diff --git a/cron/internal/worker/Dockerfile b/cron/internal/worker/Dockerfile index 35ac5810..8ae7f73b 100644 --- a/cron/internal/worker/Dockerfile +++ b/cron/internal/worker/Dockerfile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM golang:1.21.6@sha256:76aadd914a29a2ee7a6b0f3389bb2fdb87727291d688e1d972abe6c0fa6f2ee0 AS base +FROM golang:1.22.0@sha256:ef61a20960397f4d44b0e729298bf02327ca94f1519239ddc6d91689615b1367 AS base WORKDIR /src ENV CGO_ENABLED=0 COPY go.* ./ diff --git a/tools/go.mod b/tools/go.mod index 8aba1f76..3e68b41b 100644 --- a/tools/go.mod +++ b/tools/go.mod @@ -1,6 +1,6 @@ module github.com/ossf/scorecard/tools -go 1.21 +go 1.22 require ( github.com/golang/mock v1.6.0