Skip to content

Commit

Permalink
chore: use go-version-file to read .go-version
Browse files Browse the repository at this point in the history
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
  • Loading branch information
mmorel-35 committed Feb 21, 2025
1 parent 261fbbb commit 19e1be3
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 12 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/govuln.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 ./...
4 changes: 1 addition & 3 deletions .github/workflows/static-analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/test_amd64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 1 addition & 3 deletions .github/workflows/test_template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down

0 comments on commit 19e1be3

Please sign in to comment.