Skip to content

Commit 9661352

Browse files
committed
ci: pin go version to 1.20.5 (#3034)
1 parent 990d4a7 commit 9661352

File tree

4 files changed

+50
-12
lines changed

4 files changed

+50
-12
lines changed

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

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

22+
env:
23+
GO_VERSION: '1.20.5'
24+
2225
jobs:
2326
build:
2427
name: Build arm64
2528
runs-on: ubuntu-22.04
2629
steps:
2730
- uses: actions/checkout@v3
28-
- uses: actions/setup-go@v3
31+
- uses: actions/setup-go@v4
2932
with:
33+
go-version: ${{ env.GO_VERSION || '' }}
3034
go-version-file: go.mod
3135
check-latest: true
36+
cache: false
3237

3338
- name: Set up QEMU
3439
uses: docker/setup-qemu-action@v2

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

+28-9
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

@@ -31,10 +32,12 @@ jobs:
3132
steps:
3233
- uses: actions/checkout@v3
3334
- uses: docker/setup-buildx-action@v2
34-
- uses: actions/setup-go@v3
35+
- uses: actions/setup-go@v4
3536
with:
37+
go-version: ${{ env.GO_VERSION || '' }}
3638
go-version-file: go.mod
3739
check-latest: true
40+
cache: false
3841

3942
- name: Export Go full version
4043
run: echo "GO_FULL_VER=$(go version | awk '{print $3}')" >> "$GITHUB_ENV"
@@ -120,10 +123,12 @@ jobs:
120123
echo "E2E_DIR=test/e2e/source" >> "$GITHUB_ENV"
121124
fi
122125
123-
- uses: actions/setup-go@v3
126+
- uses: actions/setup-go@v4
124127
with:
128+
go-version: ${{ env.GO_VERSION || '' }}
125129
go-version-file: ${{ env.E2E_DIR }}/go.mod
126130
check-latest: true
131+
cache: false
127132

128133
- name: Export Go full version
129134
run: echo "GO_FULL_VER=$(go version | awk '{print $3}')" >> "$GITHUB_ENV"
@@ -152,10 +157,12 @@ jobs:
152157
test-netpol: ${{ steps.filter.outputs.kube-ovn-controller }}
153158
steps:
154159
- uses: actions/checkout@v3
155-
- uses: actions/setup-go@v3
160+
- uses: actions/setup-go@v4
156161
with:
162+
go-version: ${{ env.GO_VERSION || '' }}
157163
go-version-file: go.mod
158164
check-latest: true
165+
cache: false
159166

160167
- name: Generate path filter
161168
run: |
@@ -222,10 +229,12 @@ jobs:
222229
sudo sed -i '/^search/d' /etc/resolv.conf
223230
sudo systemctl restart docker
224231
225-
- uses: actions/setup-go@v3
232+
- uses: actions/setup-go@v4
226233
with:
234+
go-version: ${{ env.GO_VERSION || '' }}
227235
go-version-file: ${{ env.E2E_DIR }}/go.mod
228236
check-latest: true
237+
cache: false
229238

230239
- name: Export Go full version
231240
run: echo "GO_FULL_VER=$(go version | awk '{print $3}')" >> "$GITHUB_ENV"
@@ -321,10 +330,12 @@ jobs:
321330
sudo sed -i '/^search/d' /etc/resolv.conf
322331
sudo systemctl restart docker
323332
324-
- uses: actions/setup-go@v3
333+
- uses: actions/setup-go@v4
325334
with:
335+
go-version: ${{ env.GO_VERSION || '' }}
326336
go-version-file: ${{ env.E2E_DIR }}/go.mod
327337
check-latest: true
338+
cache: false
328339

329340
- name: Export Go full version
330341
run: echo "GO_FULL_VER=$(go version | awk '{print $3}')" >> "$GITHUB_ENV"
@@ -482,10 +493,12 @@ jobs:
482493
echo "E2E_DIR=test/e2e/source" >> "$GITHUB_ENV"
483494
fi
484495
485-
- uses: actions/setup-go@v3
496+
- uses: actions/setup-go@v4
486497
with:
498+
go-version: ${{ env.GO_VERSION || '' }}
487499
go-version-file: ${{ env.E2E_DIR }}/go.mod
488500
check-latest: true
501+
cache: false
489502

490503
- name: Export Go full version
491504
run: echo "GO_FULL_VER=$(go version | awk '{print $3}')" >> "$GITHUB_ENV"
@@ -571,10 +584,12 @@ jobs:
571584
echo "E2E_DIR=test/e2e/source" >> "$GITHUB_ENV"
572585
fi
573586
574-
- uses: actions/setup-go@v3
587+
- uses: actions/setup-go@v4
575588
with:
589+
go-version: ${{ env.GO_VERSION || '' }}
576590
go-version-file: ${{ env.E2E_DIR }}/go.mod
577591
check-latest: true
592+
cache: false
578593

579594
- name: Export Go full version
580595
run: echo "GO_FULL_VER=$(go version | awk '{print $3}')" >> "$GITHUB_ENV"
@@ -872,10 +887,12 @@ jobs:
872887
sudo sed -i '/^search/d' /etc/resolv.conf
873888
sudo systemctl restart docker
874889
875-
- uses: actions/setup-go@v3
890+
- uses: actions/setup-go@v4
876891
with:
892+
go-version: ${{ env.GO_VERSION || '' }}
877893
go-version-file: ${{ env.E2E_DIR }}/go.mod
878894
check-latest: true
895+
cache: false
879896

880897
- name: Export Go full version
881898
run: echo "GO_FULL_VER=$(go version | awk '{print $3}')" >> "$GITHUB_ENV"
@@ -969,10 +986,12 @@ jobs:
969986
echo "E2E_DIR=test/e2e/source" >> "$GITHUB_ENV"
970987
fi
971988
972-
- uses: actions/setup-go@v3
989+
- uses: actions/setup-go@v4
973990
with:
991+
go-version: ${{ env.GO_VERSION || '' }}
974992
go-version-file: ${{ env.E2E_DIR }}/go.mod
975993
check-latest: true
994+
cache: false
976995

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

.github/workflows/codeql-analysis.yml

+10-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ on:
1414
schedule:
1515
- cron: '0 17 * * 2'
1616

17+
concurrency:
18+
group: "${{ github.workflow }}-${{ github.ref }}"
19+
cancel-in-progress: true
20+
21+
env:
22+
GO_VERSION: ''
23+
1724
jobs:
1825
analyze:
1926
name: Analyze
@@ -36,10 +43,12 @@ jobs:
3643
# a pull request then we can checkout the head.
3744
fetch-depth: 2
3845

39-
- uses: actions/setup-go@v3
46+
- uses: actions/setup-go@v4
4047
with:
48+
go-version: ${{ env.GO_VERSION || '' }}
4149
go-version-file: go.mod
4250
check-latest: true
51+
cache: false
4352

4453
# Initializes the CodeQL tools for scanning.
4554
- 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)