From b84579802fbef26c1ea2daeee795a8b9f4bdb4ed Mon Sep 17 00:00:00 2001 From: Nightshift Date: Wed, 22 Apr 2026 02:24:03 +0000 Subject: [PATCH] =?UTF-8?q?fix(ci):=20align=20Go=20version=20with=20go.mod?= =?UTF-8?q?=20(1.22=20=E2=86=92=201.25.6),=20add=20permissions,=20fix=20go?= =?UTF-8?q?fmt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix Go version mismatch: ci.yml and release.yml used 1.22 while go.mod requires 1.25.6 and live-e2e.yml already uses 1.25.6 - Add explicit permissions: contents: read to ci.yml for least-privilege - Simplify gofmt check: use 'gofmt -l .' instead of find subshell [nightshift ci-fixes] --- .github/workflows/ci.yml | 11 +++++++---- .github/workflows/release.yml | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 09894fa..389b90b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,6 +5,9 @@ on: branches: ["main"] pull_request: +permissions: + contents: read + jobs: test-and-build: runs-on: ubuntu-latest @@ -14,11 +17,11 @@ jobs: - name: Setup Go uses: actions/setup-go@v5 with: - go-version: "1.22" + go-version: "1.25.6" - name: Verify formatting run: | - unformatted="$(gofmt -l $(find . -name '*.go' -type f))" + unformatted="$(gofmt -l .)" if [ -n "$unformatted" ]; then echo "Unformatted files:" echo "$unformatted" @@ -47,7 +50,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v5 with: - go-version: "1.22" + go-version: "1.25.6" - name: Build Linux CLI binary run: | @@ -68,7 +71,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v5 with: - go-version: "1.22" + go-version: "1.25.6" - name: Build Windows CLI binary run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6148923..2caa5b9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -33,7 +33,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v5 with: - go-version: "1.22" + go-version: "1.25.6" - name: Build artifacts run: |