Skip to content

Commit

Permalink
Pick golang version from go.mod
Browse files Browse the repository at this point in the history
  • Loading branch information
RebeccaMahany committed Jul 17, 2023
1 parent f068fe4 commit b487a8b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/actionlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Set up Go 1.x
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: '1.20.6'
go-version-file: './go.mod'
check-latest: true
- name: install actionlint
run: go install github.com/rhysd/actionlint/cmd/actionlint@latest
- name: actionlint
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ on:
pull_request:
branches: '**'

env:
GOVER: '1.20.6'

jobs:
build_and_test:
name: launcher
Expand All @@ -32,7 +29,8 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: ${{env.GOVER}}
go-version-file: './go.mod'
check-latest: true
id: go

# use bash, because the powershell syntax is different and this is a cross platform workflow
Expand Down Expand Up @@ -144,7 +142,8 @@ jobs:

- uses: actions/setup-go@v3
with:
go-version: ${{env.GOVER}}
go-version-file: './go.mod'
check-latest: true
id: go

- id: go-cache-paths
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.20.6'
go-version-file: './go.mod'
check-latest: true

- run: make deps

Expand Down

0 comments on commit b487a8b

Please sign in to comment.