Skip to content

Commit 58eef01

Browse files
committed
ci: pin go version to 1.20.5 (#3034)
1 parent 0f3d599 commit 58eef01

File tree

5 files changed

+59
-16
lines changed

5 files changed

+59
-16
lines changed

.github/workflows/build-arm64-image.yaml

+6-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ concurrency:
1818
group: "${{ github.workflow }}-${{ github.ref }}"
1919
cancel-in-progress: true
2020

21+
env:
22+
GO_VERSION: '1.20.5'
23+
2124
jobs:
2225
build:
2326
name: Build arm64
@@ -29,10 +32,12 @@ jobs:
2932
with:
3033
platforms: arm64
3134

32-
- uses: actions/setup-go@v3
35+
- uses: actions/setup-go@v4
3336
with:
37+
go-version: ${{ env.GO_VERSION || '' }}
3438
go-version-file: go.mod
3539
check-latest: true
40+
cache: false
3641

3742
- name: Export Go full version
3843
run: echo "GO_FULL_VER=$(go version | awk '{print $3}')" >> "$GITHUB_ENV"

.github/workflows/build-windows.yaml

+7-2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ concurrency:
2222
cancel-in-progress: true
2323

2424
env:
25+
GO_VERSION: '1.20.5'
2526
GOSEC_VERSION: '2.15.0'
2627

2728
jobs:
@@ -33,10 +34,12 @@ jobs:
3334
build-kube-ovn: ${{ steps.filter.outputs.windows-kube-ovn }}
3435
steps:
3536
- uses: actions/checkout@v3
36-
- uses: actions/setup-go@v3
37+
- uses: actions/setup-go@v4
3738
with:
39+
go-version: ${{ env.GO_VERSION || '' }}
3840
go-version-file: go.mod
3941
check-latest: true
42+
cache: false
4043

4144
- name: Generate path filter
4245
env:
@@ -177,10 +180,12 @@ jobs:
177180
if: github.event_name == 'release' || github.event_name == 'workflow_dispatch' || needs.filter.outputs.build-kube-ovn == 'true'
178181
steps:
179182
- uses: actions/checkout@v3
180-
- uses: actions/setup-go@v3
183+
- uses: actions/setup-go@v4
181184
with:
185+
go-version: ${{ env.GO_VERSION || '' }}
182186
go-version-file: go.mod
183187
check-latest: true
188+
cache: false
184189

185190
- name: Export Go full version
186191
run: |

.github/workflows/build-x86-image.yaml

+34-11
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ concurrency:
2121
cancel-in-progress: true
2222

2323
env:
24+
GO_VERSION: '1.20.5'
2425
GOSEC_VERSION: '2.15.0'
2526
HELM_VERSION: v3.11.1
2627

@@ -72,10 +73,12 @@ jobs:
7273
steps:
7374
- uses: actions/checkout@v3
7475
- uses: docker/setup-buildx-action@v2
75-
- uses: actions/setup-go@v3
76+
- uses: actions/setup-go@v4
7677
with:
78+
go-version: ${{ env.GO_VERSION || '' }}
7779
go-version-file: go.mod
7880
check-latest: true
81+
cache: false
7982

8083
- name: Export Go full version
8184
run: echo "GO_FULL_VER=$(go version | awk '{print $3}')" >> "$GITHUB_ENV"
@@ -204,10 +207,12 @@ jobs:
204207
echo "E2E_DIR=test/e2e/source" >> "$GITHUB_ENV"
205208
fi
206209
207-
- uses: actions/setup-go@v3
210+
- uses: actions/setup-go@v4
208211
with:
212+
go-version: ${{ env.GO_VERSION || '' }}
209213
go-version-file: ${{ env.E2E_DIR }}/go.mod
210214
check-latest: true
215+
cache: false
211216

212217
- name: Export Go full version
213218
run: echo "GO_FULL_VER=$(go version | awk '{print $3}')" >> "$GITHUB_ENV"
@@ -236,10 +241,12 @@ jobs:
236241
test-netpol: ${{ steps.filter.outputs.kube-ovn-controller }}
237242
steps:
238243
- uses: actions/checkout@v3
239-
- uses: actions/setup-go@v3
244+
- uses: actions/setup-go@v4
240245
with:
246+
go-version: ${{ env.GO_VERSION || '' }}
241247
go-version-file: go.mod
242248
check-latest: true
249+
cache: false
243250

244251
- name: Generate path filter
245252
run: |
@@ -306,10 +313,12 @@ jobs:
306313
sudo sed -i '/^search/d' /etc/resolv.conf
307314
sudo systemctl restart docker
308315
309-
- uses: actions/setup-go@v3
316+
- uses: actions/setup-go@v4
310317
with:
318+
go-version: ${{ env.GO_VERSION || '' }}
311319
go-version-file: ${{ env.E2E_DIR }}/go.mod
312320
check-latest: true
321+
cache: false
313322

314323
- name: Export Go full version
315324
run: echo "GO_FULL_VER=$(go version | awk '{print $3}')" >> "$GITHUB_ENV"
@@ -441,10 +450,12 @@ jobs:
441450
sudo sed -i '/^search/d' /etc/resolv.conf
442451
sudo systemctl restart docker
443452
444-
- uses: actions/setup-go@v3
453+
- uses: actions/setup-go@v4
445454
with:
455+
go-version: ${{ env.GO_VERSION || '' }}
446456
go-version-file: ${{ env.E2E_DIR }}/go.mod
447457
check-latest: true
458+
cache: false
448459

449460
- name: Export Go full version
450461
run: echo "GO_FULL_VER=$(go version | awk '{print $3}')" >> "$GITHUB_ENV"
@@ -585,10 +596,12 @@ jobs:
585596
sudo sed -i '/^search/d' /etc/resolv.conf
586597
sudo systemctl restart docker
587598
588-
- uses: actions/setup-go@v3
599+
- uses: actions/setup-go@v4
589600
with:
601+
go-version: ${{ env.GO_VERSION || '' }}
590602
go-version-file: ${{ env.E2E_DIR }}/go.mod
591603
check-latest: true
604+
cache: false
592605

593606
- name: Export Go full version
594607
run: echo "GO_FULL_VER=$(go version | awk '{print $3}')" >> "$GITHUB_ENV"
@@ -844,10 +857,12 @@ jobs:
844857
echo "E2E_DIR=test/e2e/source" >> "$GITHUB_ENV"
845858
fi
846859
847-
- uses: actions/setup-go@v3
860+
- uses: actions/setup-go@v4
848861
with:
862+
go-version: ${{ env.GO_VERSION || '' }}
849863
go-version-file: ${{ env.E2E_DIR }}/go.mod
850864
check-latest: true
865+
cache: false
851866

852867
- name: Export Go full version
853868
run: echo "GO_FULL_VER=$(go version | awk '{print $3}')" >> "$GITHUB_ENV"
@@ -969,10 +984,12 @@ jobs:
969984
echo "E2E_DIR=test/e2e/source" >> "$GITHUB_ENV"
970985
fi
971986
972-
- uses: actions/setup-go@v3
987+
- uses: actions/setup-go@v4
973988
with:
989+
go-version: ${{ env.GO_VERSION || '' }}
974990
go-version-file: ${{ env.E2E_DIR }}/go.mod
975991
check-latest: true
992+
cache: false
976993

977994
- name: Export Go full version
978995
run: echo "GO_FULL_VER=$(go version | awk '{print $3}')" >> "$GITHUB_ENV"
@@ -1198,10 +1215,12 @@ jobs:
11981215
echo "E2E_DIR=test/e2e/source" >> "$GITHUB_ENV"
11991216
fi
12001217
1201-
- uses: actions/setup-go@v3
1218+
- uses: actions/setup-go@v4
12021219
with:
1220+
go-version: ${{ env.GO_VERSION || '' }}
12031221
go-version-file: ${{ env.E2E_DIR }}/go.mod
12041222
check-latest: true
1223+
cache: false
12051224

12061225
- name: Export Go full version
12071226
run: echo "GO_FULL_VER=$(go version | awk '{print $3}')" >> "$GITHUB_ENV"
@@ -1329,10 +1348,12 @@ jobs:
13291348
sudo sed -i '/^search/d' /etc/resolv.conf
13301349
sudo systemctl restart docker
13311350
1332-
- uses: actions/setup-go@v3
1351+
- uses: actions/setup-go@v4
13331352
with:
1353+
go-version: ${{ env.GO_VERSION || '' }}
13341354
go-version-file: ${{ env.E2E_DIR }}/go.mod
13351355
check-latest: true
1356+
cache: false
13361357

13371358
- name: Export Go full version
13381359
run: echo "GO_FULL_VER=$(go version | awk '{print $3}')" >> "$GITHUB_ENV"
@@ -1427,10 +1448,12 @@ jobs:
14271448
echo "E2E_DIR=test/e2e/source" >> "$GITHUB_ENV"
14281449
fi
14291450
1430-
- uses: actions/setup-go@v3
1451+
- uses: actions/setup-go@v4
14311452
with:
1453+
go-version: ${{ env.GO_VERSION || '' }}
14321454
go-version-file: ${{ env.E2E_DIR }}/go.mod
14331455
check-latest: true
1456+
cache: false
14341457

14351458
- name: Export Go full version
14361459
run: echo "GO_FULL_VER=$(go version | awk '{print $3}')" >> "$GITHUB_ENV"

.github/workflows/codeql-analysis.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ concurrency:
1818
group: "${{ github.workflow }}-${{ github.ref }}"
1919
cancel-in-progress: true
2020

21+
env:
22+
GO_VERSION: ''
23+
2124
jobs:
2225
analyze:
2326
name: Analyze
@@ -40,10 +43,12 @@ jobs:
4043
# a pull request then we can checkout the head.
4144
fetch-depth: 2
4245

43-
- uses: actions/setup-go@v3
46+
- uses: actions/setup-go@v4
4447
with:
48+
go-version: ${{ env.GO_VERSION || '' }}
4549
go-version-file: go.mod
4650
check-latest: true
51+
cache: false
4752

4853
# Initializes the CodeQL tools for scanning.
4954
- name: Initialize CodeQL

.github/workflows/lint.yaml

+6-1
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,21 @@ concurrency:
1212
group: "${{ github.workflow }}-${{ github.ref }}"
1313
cancel-in-progress: true
1414

15+
env:
16+
GO_VERSION: ''
17+
1518
jobs:
1619
golangci:
1720
name: lint
1821
runs-on: ubuntu-22.04
1922
steps:
2023
- uses: actions/checkout@v3
21-
- uses: actions/setup-go@v3
24+
- uses: actions/setup-go@v4
2225
with:
26+
go-version: ${{ env.GO_VERSION || '' }}
2327
go-version-file: go.mod
2428
check-latest: true
29+
cache: false
2530

2631
- name: golangci-lint
2732
uses: golangci/golangci-lint-action@v3

0 commit comments

Comments
 (0)