From 0fc8e7b9c3ecea79d147af8c76f82b32fedf1a87 Mon Sep 17 00:00:00 2001 From: Paul Querna Date: Fri, 26 Jun 2026 05:28:24 +0000 Subject: [PATCH] ci: fix Go workflow versions Checkout before setup-go so dependency caching can see go.sum, use go.mod as the workflow Go version source of truth, and pin golangci-lint to a v2 release compatible with the repo's v2 config. Update the module directive to Go 1.26 and carry that through release workflows instead of stale hardcoded Go versions. Co-authored-by: c1-squire-dev[bot] --- .github/workflows/ci.yaml | 25 ++++++++++++------------- .github/workflows/main.yaml | 23 +++++++++++------------ .github/workflows/release.yaml | 18 +++++++++--------- go.mod | 2 +- 4 files changed, 33 insertions(+), 35 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 66318c52..4b0ebe84 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -4,35 +4,34 @@ jobs: go-lint: runs-on: ubuntu-latest steps: + - name: Checkout code + uses: actions/checkout@v7 - name: Install Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v6 with: - go-version: 1.23.x - - name: Checkout code - uses: actions/checkout@v3 + go-version-file: go.mod - name: Run linters - uses: golangci/golangci-lint-action@v7 + uses: golangci/golangci-lint-action@v9 with: - version: v2.1 + version: v2.9.0 args: --timeout=3m go-test: strategy: matrix: - go-version: [1.23.x] platform: [ubuntu-latest] runs-on: ${{ matrix.platform }} steps: + - name: Checkout code + uses: actions/checkout@v7 - name: Install Go if: success() - uses: actions/setup-go@v4 + uses: actions/setup-go@v6 with: - go-version: ${{ matrix.go-version }} - - name: Checkout code - uses: actions/checkout@v3 + go-version-file: go.mod - name: go tests run: go test -v -covermode=count -json ./... > test.json - name: annotate go tests if: always() - uses: guyarb/golang-test-annotations@v0.6.0 + uses: guyarb/golang-test-annotations@v0.9.0 with: - test-results: test.json \ No newline at end of file + test-results: test.json diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index a52dc8fc..7f402c9d 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -7,35 +7,34 @@ jobs: go-lint: runs-on: ubuntu-latest steps: + - name: Checkout code + uses: actions/checkout@v7 - name: Install Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v6 with: - go-version: 1.23.x - - name: Checkout code - uses: actions/checkout@v3 + go-version-file: go.mod - name: Run linters - uses: golangci/golangci-lint-action@v3 + uses: golangci/golangci-lint-action@v9 with: - version: latest + version: v2.9.0 args: --timeout=3m go-test: strategy: matrix: - go-version: [ 1.23.x ] platform: [ ubuntu-latest ] runs-on: ${{ matrix.platform }} steps: + - name: Checkout code + uses: actions/checkout@v7 - name: Install Go if: success() - uses: actions/setup-go@v4 + uses: actions/setup-go@v6 with: - go-version: ${{ matrix.go-version }} - - name: Checkout code - uses: actions/checkout@v3 + go-version-file: go.mod - name: go tests run: go test -v -covermode=count -json ./... > test.json - name: annotate go tests if: always() - uses: guyarb/golang-test-annotations@v0.6.0 + uses: guyarb/golang-test-annotations@v0.9.0 with: test-results: test.json diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index db9b66df..1945db8d 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -10,13 +10,13 @@ jobs: runs-on: macos-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v7 with: fetch-depth: 0 - name: Set up Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v6 with: - go-version: 1.23.x + go-version-file: go.mod - name: Set up Gon run: brew tap conductorone/gon && brew install conductorone/gon/gon - name: Import Keychain Certs @@ -37,25 +37,25 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v7 with: fetch-depth: 0 - name: Set up Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v6 with: - go-version: 1.23.x + go-version-file: go.mod - name: Docker Login - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.RELENG_GITHUB_TOKEN }} - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v3 - name: Run GoReleaser uses: goreleaser/goreleaser-action@v6 with: version: "~> v2" args: release --clean -f .goreleaser.docker.yaml env: - GITHUB_TOKEN: ${{ secrets.RELENG_GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.RELENG_GITHUB_TOKEN }} diff --git a/go.mod b/go.mod index e081445f..1fa49940 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/conductorone/cone -go 1.24.2 +go 1.26 require ( go.uber.org/zap v1.27.0