Skip to content

Commit

Permalink
Merge pull request #193 from MrDXY/adopt-go-version-file
Browse files Browse the repository at this point in the history
Move go version to dedicated `.go-version` file
  • Loading branch information
ahrtr authored Apr 8, 2024
2 parents f7321f1 + a5c587b commit d9cb993
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/govuln.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: goversion
run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT"
- uses: actions/setup-go@v5
with:
go-version: "1.22.2"
go-version: ${{ steps.goversion.outputs.goversion }}
- run: date
- run: go install golang.org/x/vuln/cmd/govulncheck@latest && govulncheck ./...
4 changes: 3 additions & 1 deletion .github/workflows/static-analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: goversion
run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT"
- uses: actions/setup-go@v5
with:
go-version: "1.22.2"
go-version: ${{ steps.goversion.outputs.goversion }}
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_amd64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ jobs:
run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT"
- uses: actions/setup-go@v5
with:
go-version: "1.22.2"
go-version: ${{ steps.goversion.outputs.goversion }}
- run: make test
4 changes: 3 additions & 1 deletion .github/workflows/test_template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@ jobs:
target: ${{ fromJSON(inputs.targets) }}
steps:
- uses: actions/checkout@v4
- id: goversion
run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT"
- uses: actions/setup-go@v5
with:
go-version: "1.22.2"
go-version: ${{ steps.goversion.outputs.goversion }}
- env:
TARGET: ${{ matrix.target }}
run: |
Expand Down
1 change: 1 addition & 0 deletions .go-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.22.2

0 comments on commit d9cb993

Please sign in to comment.