From 63e6f34c33a9246c90bbbd2dfbd8f4317ba49900 Mon Sep 17 00:00:00 2001 From: Praveen M Date: Wed, 24 Apr 2024 22:05:29 +0530 Subject: [PATCH] ci: use Go 1.22 for GitHub Workflows Signed-off-by: Praveen M --- .github/workflows/build-push.yaml | 2 +- .github/workflows/golangci-lint.yaml | 2 +- .github/workflows/kind-deploy.yaml | 2 +- .github/workflows/tag-release.yaml | 4 ++-- .github/workflows/test-build.yaml | 2 +- .github/workflows/test-golang.yaml | 6 +++--- Dockerfile | 2 +- build/Containerfile.sidecar | 2 +- go.mod | 4 ++-- 9 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build-push.yaml b/.github/workflows/build-push.yaml index d88b742fb..67cf0d1c8 100644 --- a/.github/workflows/build-push.yaml +++ b/.github/workflows/build-push.yaml @@ -19,7 +19,7 @@ jobs: - name: Setup Golang uses: actions/setup-go@v5 with: - go-version: "1.21" + go-version: "1.22" - name: Generate the bundle contents run: make bundle diff --git a/.github/workflows/golangci-lint.yaml b/.github/workflows/golangci-lint.yaml index 8e2cf1e84..72f882b32 100644 --- a/.github/workflows/golangci-lint.yaml +++ b/.github/workflows/golangci-lint.yaml @@ -18,7 +18,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: - go-version: '1.21' + go-version: '1.22' cache: false - name: golangci-lint uses: golangci/golangci-lint-action@v4 diff --git a/.github/workflows/kind-deploy.yaml b/.github/workflows/kind-deploy.yaml index 3332e5c67..a8d6a3248 100644 --- a/.github/workflows/kind-deploy.yaml +++ b/.github/workflows/kind-deploy.yaml @@ -23,7 +23,7 @@ jobs: - name: Set up Golang uses: actions/setup-go@v5 with: - go-version: "1.21" + go-version: "1.22" - name: Build container container image uses: docker/build-push-action@v5 diff --git a/.github/workflows/tag-release.yaml b/.github/workflows/tag-release.yaml index 87019c4ee..32d86ec3d 100644 --- a/.github/workflows/tag-release.yaml +++ b/.github/workflows/tag-release.yaml @@ -20,7 +20,7 @@ jobs: - name: Setup Golang uses: actions/setup-go@v5 with: - go-version: "1.21" + go-version: "1.22" - name: Generate the bundle contents run: make bundle TAG=${{ github.ref_name }} @@ -129,7 +129,7 @@ jobs: - name: Setup Golang uses: actions/setup-go@v5 with: - go-version: "1.21" + go-version: "1.22" - name: Generate manifests for installation by kubectl run: make manifests TAG=${{ github.ref_name }} diff --git a/.github/workflows/test-build.yaml b/.github/workflows/test-build.yaml index e75c08bd5..81c78d91d 100644 --- a/.github/workflows/test-build.yaml +++ b/.github/workflows/test-build.yaml @@ -18,7 +18,7 @@ jobs: - name: Setup Golang uses: actions/setup-go@v5 with: - go-version: "1.21" + go-version: "1.22" - name: Generate the bundle contents run: make bundle diff --git a/.github/workflows/test-golang.yaml b/.github/workflows/test-golang.yaml index c91651452..d7356b358 100644 --- a/.github/workflows/test-golang.yaml +++ b/.github/workflows/test-golang.yaml @@ -18,7 +18,7 @@ jobs: - name: Set up Golang uses: actions/setup-go@v5 with: - go-version: "1.21" + go-version: "1.22" - name: Install Protoc # action @v1.3.0 can install protoc 3.19, @v2 installs protoc v21.0+ @@ -46,7 +46,7 @@ jobs: - name: Set up Golang uses: actions/setup-go@v5 with: - go-version: "1.21" + go-version: "1.22" - name: Verify Go modules run: go mod verify @@ -61,7 +61,7 @@ jobs: - name: Set up Golang uses: actions/setup-go@v5 with: - go-version: "1.21" + go-version: "1.22" - name: Vendor all dependencies run: go mod vendor diff --git a/Dockerfile b/Dockerfile index 682194b88..1440cdfc5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM golang:1.21 as builder +FROM golang:1.22 as builder # Copy the contents of the repository COPY . /workspace/go/src/github.com/csi-addons/kubernetes-csi-addons diff --git a/build/Containerfile.sidecar b/build/Containerfile.sidecar index e6234e5f4..4de2e6db9 100644 --- a/build/Containerfile.sidecar +++ b/build/Containerfile.sidecar @@ -1,5 +1,5 @@ # Build the sidecar binary -FROM golang:1.21 as builder +FROM golang:1.22 as builder # Copy the contents of the repository COPY . /workspace/go/src/github.com/csi-addons/kubernetes-csi-addons diff --git a/go.mod b/go.mod index d27e68a5e..7c5dcd78f 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,8 @@ module github.com/csi-addons/kubernetes-csi-addons -go 1.21 +go 1.22 -toolchain go1.21.5 +toolchain go1.22.2 require ( github.com/container-storage-interface/spec v1.9.0