Skip to content

Commit

Permalink
Fix go version in workflows (#214)
Browse files Browse the repository at this point in the history
push workflow was using go 1.19

Also adds a per-workflow env var so we only need to change one
line when bumping go

Signed-off-by: Sunjay Bhatia <[email protected]>
  • Loading branch information
sunjayBhatia authored Mar 27, 2024
1 parent eebc5e3 commit ea6643e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ on:
pull_request:
types: [opened, synchronize]

env:
GO_VERSION: '1.20'

jobs:
lint:
name: lint-check
Expand All @@ -12,7 +15,7 @@ jobs:
- uses: actions/setup-go@v2
with:
stable: 'true'
go-version: '1.20' # The Go version to download (if necessary) and use.
go-version: ${{ env.GO_VERSION }}

- name: Build hack tools for linting
run: cd hack/tools && make golangci-lint
Expand Down Expand Up @@ -42,7 +45,7 @@ jobs:
- uses: actions/setup-go@v2
with:
stable: 'true'
go-version: '1.20' # The Go version to download (if necessary) and use.
go-version: ${{ env.GO_VERSION }}
- name: Build hack tools for unit testing
run: cd hack/tools && make controller-gen etcd ginkgo kustomize

Expand All @@ -66,7 +69,7 @@ jobs:
- uses: actions/setup-go@v2
with:
stable: 'true'
go-version: '1.20' # The Go version to download (if necessary) and use.
go-version: ${{ env.GO_VERSION }}
- name: Build hack tools for integration testing
run: cd hack/tools && make controller-gen etcd ginkgo kustomize
- name: Perform integration tests
Expand All @@ -80,7 +83,7 @@ jobs:
- uses: actions/setup-go@v2
with:
stable: 'true'
go-version: '1.20' # The Go version to download (if necessary) and use.
go-version: ${{ env.GO_VERSION }}

# uncomment this step for debugging: tmate session
# - name: Setup tmate session
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
- 'main'
- 'release-**'

env:
GO_VERSION: '1.20'

jobs:
lint:
Expand All @@ -15,7 +17,7 @@ jobs:
- uses: actions/setup-go@v2
with:
stable: 'true'
go-version: '1.20' # The Go version to download (if necessary) and use.
go-version: ${{ env.GO_VERSION }}

- name: Build hack tools for linting
run: cd hack/tools && make golangci-lint
Expand Down Expand Up @@ -45,7 +47,7 @@ jobs:
- uses: actions/setup-go@v2
with:
stable: 'true'
go-version: '1.19' # The Go version to download (if necessary) and use.
go-version: ${{ env.GO_VERSION }}
- name: Build hack tools for unit testing
run: cd hack/tools && make controller-gen etcd ginkgo kustomize

Expand Down

0 comments on commit ea6643e

Please sign in to comment.