From 0686fc08c81dc88f732e9911dcc3b0d6c36ba334 Mon Sep 17 00:00:00 2001 From: subhamkrai Date: Thu, 22 Feb 2024 16:43:31 +0530 Subject: [PATCH] ci: update runner go version to 1.21 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit created a composite yaml for setting up go version that will be use for CI and releaser yaml. The releaser ci is failing https://github.com/rook/kubectl-rook-ceph/actions/runs/8003450560/job/21858788476 with error ``` тип release failed after 0s error=hook failed: shell: 'go mod tidy': exit status 1: go: go.mod file indicates go 1.21, but maximum version supported by tidy is 1.20 ``` hopefull after this, releaser ci will be happy. Signed-off-by: subhamkrai --- .github/workflows/go-test.yaml | 10 +++------- .github/workflows/release.yaml | 3 +++ .github/workflows/set-up-go/action.yaml | 10 ++++++++++ 3 files changed, 16 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/set-up-go/action.yaml diff --git a/.github/workflows/go-test.yaml b/.github/workflows/go-test.yaml index 7c529d84..387ee2cc 100644 --- a/.github/workflows/go-test.yaml +++ b/.github/workflows/go-test.yaml @@ -24,9 +24,7 @@ jobs: fetch-depth: 0 - name: setup golang - uses: actions/setup-go@v5 - with: - go-version: "1.20" + uses: ./.github/workflows/set-up-go - name: consider debugging uses: ./.github/workflows/tmate_debug @@ -180,9 +178,7 @@ jobs: fetch-depth: 0 - name: setup golang - uses: actions/setup-go@v5 - with: - go-version: "1.20" + uses: ./.github/workflows/set-up-go - name: consider debugging uses: ./.github/workflows/tmate_debug @@ -241,7 +237,7 @@ jobs: kubectl rook-ceph --operator-namespace test-operator -n test-cluster subvolume ls kubectl rook-ceph --operator-namespace test-operator -n test-cluster subvolume ls --stale kubectl rook-ceph --operator-namespace test-operator -n test-cluster subvolume delete myfs test-subvol group-a - kubectl rook-ceph --operator-namespace test-operator -n test-cluster subvolume delete myfs test-subvol-1 + kubectl rook-ceph --operator-namespace test-operator -n test-cluster subvolume delete myfs test-subvol-1 - name: Get mon endpoints run: | diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 81e26ff8..68aab927 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -13,6 +13,9 @@ jobs: with: fetch-depth: 0 + - name: setup golang + uses: ./.github/workflows/set-up-go + - name: GoReleaser uses: goreleaser/goreleaser-action@v5 with: diff --git a/.github/workflows/set-up-go/action.yaml b/.github/workflows/set-up-go/action.yaml new file mode 100644 index 00000000..bd80f1a9 --- /dev/null +++ b/.github/workflows/set-up-go/action.yaml @@ -0,0 +1,10 @@ +name: Set up Golang +description: Set up go for CI + +runs: + using: "composite" + steps: + - name: setup golang + uses: actions/setup-go@v5 + with: + go-version: "1.21"