Skip to content

Commit ea6643e

Browse files
authored
Fix go version in workflows (#214)
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]>
1 parent eebc5e3 commit ea6643e

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

.github/workflows/actions.yml

+7-4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ on:
33
pull_request:
44
types: [opened, synchronize]
55

6+
env:
7+
GO_VERSION: '1.20'
8+
69
jobs:
710
lint:
811
name: lint-check
@@ -12,7 +15,7 @@ jobs:
1215
- uses: actions/setup-go@v2
1316
with:
1417
stable: 'true'
15-
go-version: '1.20' # The Go version to download (if necessary) and use.
18+
go-version: ${{ env.GO_VERSION }}
1619

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

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

8588
# uncomment this step for debugging: tmate session
8689
# - name: Setup tmate session

.github/workflows/push.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55
- 'main'
66
- 'release-**'
77

8+
env:
9+
GO_VERSION: '1.20'
810

911
jobs:
1012
lint:
@@ -15,7 +17,7 @@ jobs:
1517
- uses: actions/setup-go@v2
1618
with:
1719
stable: 'true'
18-
go-version: '1.20' # The Go version to download (if necessary) and use.
20+
go-version: ${{ env.GO_VERSION }}
1921

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

0 commit comments

Comments
 (0)