Skip to content

Commit

Permalink
ghactions: setup-go: Use go version from go.mod
Browse files Browse the repository at this point in the history
This commit changes uses of actions/setup-go to pick the go version
required in go.mod.
This means we'll be using the same go version everywhere, and since
there is no major version hardcoded (such as '1.20.x'), this means we
don't need to remember to update it once in a while.

Signed-off-by: Christophe Fergeau <[email protected]>
  • Loading branch information
cfergeau committed May 17, 2024
1 parent 4217481 commit 647723a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.20.x
go-version-file: 'go.mod'

- name: Test
run: make test
Expand All @@ -72,12 +72,12 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.20.x
go-version-file: 'go.mod'

- name: Build
- name: Build
run: make win-sshproxy

- name: Test
- name: Test
run: go test -v .\test-win-sshproxy


5 changes: 2 additions & 3 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@ jobs:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.20.x

- uses: actions/checkout@v4
go-version-file: 'go.mod'
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'

- name: Build
run: |
Expand Down

0 comments on commit 647723a

Please sign in to comment.