From 590d3bda19eed0fff27f872e55a962e19225a730 Mon Sep 17 00:00:00 2001 From: Lucas TESSON Date: Fri, 1 Mar 2024 22:08:55 +0100 Subject: [PATCH] ci: install Go from its in-code version --- .github/workflows/ci.yaml | 13 ++----------- .github/workflows/codeql-analysis.yaml | 2 +- .github/workflows/goreleaser.yaml | 3 +-- 3 files changed, 4 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 846ece2..b32f5eb 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -15,14 +15,6 @@ jobs: access_token: ${{ github.token }} tests: - strategy: - matrix: - go-version: [1.x, 1.21.x] - platform: [ubuntu-latest] - include: - - go-version: 1.x - platform: ubuntu-latest - update-coverage: true runs-on: ${{ matrix.platform }} needs: [setup] steps: @@ -32,7 +24,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v5 with: - go-version: ${{ matrix.go-version }} + go-version-file: go.mod - name: Cache go modules uses: actions/cache@v4 @@ -45,7 +37,6 @@ jobs: run: make tests - name: Upload coverage to Coveralls - if: ${{ matrix.update-coverage }} uses: shogo82148/actions-goveralls@v1 with: path-to-profile: coverage.txt @@ -57,7 +48,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: - go-version: 1.21.x + go-version-file: go.mod - name: go-lint uses: golangci/golangci-lint-action@v4 diff --git a/.github/workflows/codeql-analysis.yaml b/.github/workflows/codeql-analysis.yaml index 2135e2a..b7f99be 100644 --- a/.github/workflows/codeql-analysis.yaml +++ b/.github/workflows/codeql-analysis.yaml @@ -28,7 +28,7 @@ jobs: - uses: actions/setup-go@v5 with: - go-version: '1.21.0' + go-version-file: go.mod - name: Initialize CodeQL uses: github/codeql-action/init@v3 diff --git a/.github/workflows/goreleaser.yaml b/.github/workflows/goreleaser.yaml index d2d7d10..dae4dae 100644 --- a/.github/workflows/goreleaser.yaml +++ b/.github/workflows/goreleaser.yaml @@ -23,8 +23,7 @@ jobs: - name: Set up Go uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 with: - go-version: "1.21" - check-latest: true + go-version-file: go.mod - name: Install Syft run: | curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin