Skip to content

Commit

Permalink
Must invoke actions/checkout before actions/setup-go to ensure we…
Browse files Browse the repository at this point in the history
… can read the desired Go version from `go.mod`
  • Loading branch information
detro committed Apr 21, 2024
1 parent 4fefa4c commit 3452d60
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ jobs:
timeout-minutes: 5
steps:

- name: Check out code
uses: actions/checkout@v4

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache: true
check-latest: true

- name: Check out code
uses: actions/checkout@v4

- name: Run linters
uses: golangci/golangci-lint-action@v4
with:
Expand Down Expand Up @@ -78,16 +78,16 @@ jobs:
- '1.8.*'
steps:

- name: Check out code
uses: actions/checkout@v4

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache: true
check-latest: true

- name: Check out code
uses: actions/checkout@v4

- name: Setup Terraform ${{ matrix.terraform }}
uses: hashicorp/setup-terraform@v3
with:
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,10 @@ jobs:
runs-on: ubuntu-latest
steps:

- name: Checkout
- name: Check out code
uses: actions/checkout@v4

- name: Unshallow
run: git fetch --prune --unshallow

- name: Set up Go

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
Expand Down

0 comments on commit 3452d60

Please sign in to comment.