Skip to content

Commit

Permalink
feat: use go-version-file: go.mod for go version detecting (#2694)
Browse files Browse the repository at this point in the history
Signed-off-by: yxxhero <[email protected]>
  • Loading branch information
yxxhero authored Sep 5, 2023
1 parent e177ac5 commit db4dcaf
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 11 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ on:
schedule:
- cron: '0 4 * * *'

env:
GO_VERSION: '1.20'

jobs:
test:
name: Test
Expand All @@ -27,7 +24,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
go-version-file: go.mod

- name: Build manager console assets
run: |-
Expand Down Expand Up @@ -68,7 +65,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
go-version-file: go.mod

- name: Setup QEMU
uses: docker/setup-qemu-action@v2
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/compatibility-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ on:
- cron: '0 4 * * *'

env:
GO_VERSION: '1.20'
KIND_VERSION: v0.12.0
CONTAINERD_VERSION: v1.5.2
KIND_CONFIG_PATH: test/testdata/kind/config.yaml
Expand Down Expand Up @@ -54,7 +53,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
go-version-file: go.mod

- name: Get dependencies
run: |
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ on:
- cron: '0 4 * * *'

env:
GO_VERSION: '1.20'
KIND_VERSION: v0.12.0
CONTAINERD_VERSION: v1.5.2
KIND_CONFIG_PATH: test/testdata/kind/config.yaml
Expand Down Expand Up @@ -69,7 +68,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
go-version-file: go.mod

- name: Get dependencies
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

- uses: actions/setup-go@v4
with:
go-version: '1.20'
go-version-file: go.mod
cache: false

- name: Golangci lint
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
go-version-file: go.mod

- name: Check GoReleaser config
uses: goreleaser/goreleaser-action@v4
Expand Down

0 comments on commit db4dcaf

Please sign in to comment.