6
6
pull_request :
7
7
branches : ['main', 'release/**']
8
8
9
- env :
10
- # Go version we currently use to build containerd across all CI.
11
- # Note: don't forget to update `Binaries` step, as it contains the matrix of all supported Go versions.
12
- GO_VERSION : " 1.21.6"
13
-
14
9
permissions : # added using https://github.com/step-security/secure-workflows
15
10
contents : read
16
11
31
26
os : [ubuntu-22.04, actuated-arm64-4cpu-16gb, macos-12, windows-2019]
32
27
33
28
steps :
34
- - uses : actions/setup-go@v5
35
- with :
36
- go-version : ${{ env.GO_VERSION }}
37
- cache : false # see actions/setup-go#368
38
-
39
29
- uses : actions/checkout@v4
30
+ - uses : ./.github/actions/install-go
40
31
- uses : golangci/golangci-lint-action@v3
41
32
with :
42
33
version : v1.55.2
@@ -53,16 +44,13 @@ jobs:
53
44
timeout-minutes : 5
54
45
55
46
steps :
56
- - uses : actions/setup-go@v5
57
- with :
58
- go-version : ${{ env.GO_VERSION }}
59
- cache : false # see actions/setup-go#368
60
-
61
47
- uses : actions/checkout@v4
62
48
with :
63
49
path : src/github.com/containerd/containerd
64
50
fetch-depth : 100
65
51
52
+ - uses : ./src/github.com/containerd/containerd/.github/actions/install-go
53
+
66
54
-
uses :
containerd/[email protected]
67
55
with :
68
56
working-directory : src/github.com/containerd/containerd
@@ -87,15 +75,12 @@ jobs:
87
75
working-directory : src/github.com/containerd/containerd
88
76
89
77
steps :
90
- - uses : actions/setup-go@v5
91
- with :
92
- go-version : ${{ env.GO_VERSION }}
93
- cache : false # see actions/setup-go#368
94
-
95
78
- uses : actions/checkout@v4
96
79
with :
97
80
path : src/github.com/containerd/containerd
98
81
82
+ - uses : ./src/github.com/containerd/containerd/.github/actions/install-go
83
+
99
84
- name : Set env
100
85
shell : bash
101
86
run : |
@@ -120,11 +105,8 @@ jobs:
120
105
timeout-minutes : 5
121
106
122
107
steps :
123
- - uses : actions/setup-go@v5
124
- with :
125
- go-version : ${{ env.GO_VERSION }}
126
- cache : false # see actions/setup-go#368
127
108
- uses : actions/checkout@v4
109
+ - uses : ./.github/actions/install-go
128
110
-
run :
go install github.com/cpuguy83/go-md2man/[email protected]
129
111
- run : make man
130
112
@@ -154,11 +136,8 @@ jobs:
154
136
goarm : " 7"
155
137
156
138
steps :
157
- - uses : actions/setup-go@v5
158
- with :
159
- go-version : ${{ env.GO_VERSION }}
160
- cache : false # see actions/setup-go#368
161
139
- uses : actions/checkout@v4
140
+ - uses : ./.github/actions/install-go
162
141
- run : |
163
142
set -e -x
164
143
@@ -211,13 +190,8 @@ jobs:
211
190
os : [ubuntu-22.04, actuated-arm64-4cpu-16gb, macos-12, windows-2019, windows-2022]
212
191
go-version : ["1.20.13", "1.21.6"]
213
192
steps :
214
- - uses : actions/setup-go@v5
215
- with :
216
- go-version : ${{ matrix.go-version }}
217
- cache : false # see actions/setup-go#368
218
-
219
193
- uses : actions/checkout@v4
220
-
194
+ - uses : ./.github/actions/install-go
221
195
- name : Make
222
196
run : |
223
197
make build
@@ -245,15 +219,12 @@ jobs:
245
219
working-directory : src/github.com/containerd/containerd
246
220
247
221
steps :
248
- - uses : actions/setup-go@v5
249
- with :
250
- go-version : ${{ env.GO_VERSION }}
251
- cache : false # see actions/setup-go#368
252
-
253
222
- uses : actions/checkout@v4
254
223
with :
255
224
path : src/github.com/containerd/containerd
256
225
226
+ - uses : ./.github/actions/install-go
227
+
257
228
- uses : actions/checkout@v4
258
229
with :
259
230
repository : kubernetes-sigs/cri-tools
@@ -409,12 +380,8 @@ jobs:
409
380
env :
410
381
GOTEST : gotestsum --
411
382
steps :
412
- - uses : actions/setup-go@v5
413
- with :
414
- go-version : ${{ env.GO_VERSION }}
415
- cache : false # see actions/setup-go#368
416
-
417
383
- uses : actions/checkout@v4
384
+ - uses : ./.github/actions/install-go
418
385
419
386
- name : Install containerd dependencies
420
387
env :
@@ -614,11 +581,8 @@ jobs:
614
581
GOTEST : gotestsum --
615
582
616
583
steps :
617
- - uses : actions/setup-go@v5
618
- with :
619
- go-version : ${{ env.GO_VERSION }}
620
- cache : false # see actions/setup-go#368
621
584
- uses : actions/checkout@v4
585
+ - uses : ./.github/actions/install-go
622
586
- run : script/setup/install-gotestsum
623
587
- run : script/setup/install-teststat
624
588
- name : Tests
0 commit comments