From 19e1be3024d6189b01dc2967ac564032ac3afee3 Mon Sep 17 00:00:00 2001 From: Matthieu MOREL Date: Fri, 21 Feb 2025 13:34:11 +0100 Subject: [PATCH] chore: use go-version-file to read .go-version Signed-off-by: Matthieu MOREL --- .github/workflows/govuln.yaml | 4 +--- .github/workflows/static-analysis.yaml | 4 +--- .github/workflows/test_amd64.yaml | 4 +--- .github/workflows/test_template.yaml | 4 +--- 4 files changed, 4 insertions(+), 12 deletions(-) diff --git a/.github/workflows/govuln.yaml b/.github/workflows/govuln.yaml index 836601ae..c07b4bed 100644 --- a/.github/workflows/govuln.yaml +++ b/.github/workflows/govuln.yaml @@ -5,10 +5,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - id: goversion - run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT" - uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0 with: - go-version: ${{ steps.goversion.outputs.goversion }} + go-version-file: .go-version - run: date - run: go install golang.org/x/vuln/cmd/govulncheck@latest && govulncheck ./... diff --git a/.github/workflows/static-analysis.yaml b/.github/workflows/static-analysis.yaml index 2c8baeb5..c07eb22c 100644 --- a/.github/workflows/static-analysis.yaml +++ b/.github/workflows/static-analysis.yaml @@ -5,11 +5,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - id: goversion - run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT" - uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0 with: - go-version: ${{ steps.goversion.outputs.goversion }} + go-version-file: .go-version - name: golangci-lint uses: golangci/golangci-lint-action@051d91933864810ecd5e2ea2cfd98f6a5bca5347 # v6.3.2 with: diff --git a/.github/workflows/test_amd64.yaml b/.github/workflows/test_amd64.yaml index 038ce670..5a90daea 100644 --- a/.github/workflows/test_amd64.yaml +++ b/.github/workflows/test_amd64.yaml @@ -18,9 +18,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - id: goversion - run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT" - uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0 with: - go-version: ${{ steps.goversion.outputs.goversion }} + go-version-file: .go-version - run: make test diff --git a/.github/workflows/test_template.yaml b/.github/workflows/test_template.yaml index a7d33bf0..4b3d18b8 100644 --- a/.github/workflows/test_template.yaml +++ b/.github/workflows/test_template.yaml @@ -23,11 +23,9 @@ jobs: target: ${{ fromJSON(inputs.targets) }} steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - id: goversion - run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT" - uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0 with: - go-version: ${{ steps.goversion.outputs.goversion }} + go-version-file: .go-version - env: TARGET: ${{ matrix.target }} run: |