From d1f81f04a130c32aced5817ab35ad630c0285cbe Mon Sep 17 00:00:00 2001 From: Michal Wasilewski Date: Wed, 27 Sep 2023 17:44:23 +0200 Subject: [PATCH 1/2] chore: upgrade to go 1.21 Signed-off-by: Michal Wasilewski --- .github/workflows/lint.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/unit-testing.yml | 4 ++-- go.mod | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 0d9f279..6e5ec66 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -8,7 +8,7 @@ jobs: lint: name: Lint the code runs-on: ubuntu-latest - container: golang:1.19 + container: golang:1.21 steps: - name: Check out repository code diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3dd8512..a24ecba 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,7 +25,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 - with: { go-version: 1.19 } + with: { go-version: 1.21 } - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 diff --git a/.github/workflows/unit-testing.yml b/.github/workflows/unit-testing.yml index 0fa0067..ec61d33 100644 --- a/.github/workflows/unit-testing.yml +++ b/.github/workflows/unit-testing.yml @@ -14,11 +14,11 @@ jobs: steps: - name: Check out repository code uses: actions/checkout@v3 - + - name: Install go uses: actions/setup-go@v4 with: - go-version: '1.19' + go-version: '1.21' - name: Install dependencies run: go mod download diff --git a/go.mod b/go.mod index 7352e79..71337e8 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/spacelift-io/spacectl -go 1.19 +go 1.21 require ( github.com/ProtonMail/gopenpgp/v2 v2.6.1 From f8305355f465f615f25f945cab7b582154cd5b6b Mon Sep 17 00:00:00 2001 From: Michal Wasilewski Date: Thu, 28 Sep 2023 17:56:02 +0200 Subject: [PATCH 2/2] fix: mark the workspace as safe to prevent a go build error Signed-off-by: Michal Wasilewski --- .github/workflows/lint.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 6e5ec66..ab136c7 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -14,6 +14,9 @@ jobs: - name: Check out repository code uses: actions/checkout@v3 + - name: Mark source directory as safe. + run: git config --global --add safe.directory $GITHUB_WORKSPACE + - name: Check formatting using gofmt run: gofmt -s -l -d .