66 pull_request :
77 branches : ['main', 'release/**']
88
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-
149permissions : # added using https://github.com/step-security/secure-workflows
1510 contents : read
1611
3126 os : [ubuntu-22.04, actuated-arm64-4cpu-16gb, macos-12, windows-2019]
3227
3328 steps :
34- - uses : actions/setup-go@v5
35- with :
36- go-version : ${{ env.GO_VERSION }}
37- cache : false # see actions/setup-go#368
38-
3929 - uses : actions/checkout@v4
30+ - uses : ./.github/actions/install-go
4031 - uses : golangci/golangci-lint-action@v3
4132 with :
4233 version : v1.55.2
@@ -53,16 +44,13 @@ jobs:
5344 timeout-minutes : 5
5445
5546 steps :
56- - uses : actions/setup-go@v5
57- with :
58- go-version : ${{ env.GO_VERSION }}
59- cache : false # see actions/setup-go#368
60-
6147 - uses : actions/checkout@v4
6248 with :
6349 path : src/github.com/containerd/containerd
6450 fetch-depth : 100
6551
52+ - uses : ./src/github.com/containerd/containerd/.github/actions/install-go
53+
6654 -
uses :
containerd/[email protected] 6755 with :
6856 working-directory : src/github.com/containerd/containerd
@@ -87,15 +75,12 @@ jobs:
8775 working-directory : src/github.com/containerd/containerd
8876
8977 steps :
90- - uses : actions/setup-go@v5
91- with :
92- go-version : ${{ env.GO_VERSION }}
93- cache : false # see actions/setup-go#368
94-
9578 - uses : actions/checkout@v4
9679 with :
9780 path : src/github.com/containerd/containerd
9881
82+ - uses : ./src/github.com/containerd/containerd/.github/actions/install-go
83+
9984 - name : Set env
10085 shell : bash
10186 run : |
@@ -120,11 +105,8 @@ jobs:
120105 timeout-minutes : 5
121106
122107 steps :
123- - uses : actions/setup-go@v5
124- with :
125- go-version : ${{ env.GO_VERSION }}
126- cache : false # see actions/setup-go#368
127108 - uses : actions/checkout@v4
109+ - uses : ./.github/actions/install-go
128110 -
run :
go install github.com/cpuguy83/go-md2man/[email protected] 129111 - run : make man
130112
@@ -154,11 +136,8 @@ jobs:
154136 goarm : " 7"
155137
156138 steps :
157- - uses : actions/setup-go@v5
158- with :
159- go-version : ${{ env.GO_VERSION }}
160- cache : false # see actions/setup-go#368
161139 - uses : actions/checkout@v4
140+ - uses : ./.github/actions/install-go
162141 - run : |
163142 set -e -x
164143
@@ -211,13 +190,8 @@ jobs:
211190 os : [ubuntu-22.04, actuated-arm64-4cpu-16gb, macos-12, windows-2019, windows-2022]
212191 go-version : ["1.20.13", "1.21.6"]
213192 steps :
214- - uses : actions/setup-go@v5
215- with :
216- go-version : ${{ matrix.go-version }}
217- cache : false # see actions/setup-go#368
218-
219193 - uses : actions/checkout@v4
220-
194+ - uses : ./.github/actions/install-go
221195 - name : Make
222196 run : |
223197 make build
@@ -245,15 +219,12 @@ jobs:
245219 working-directory : src/github.com/containerd/containerd
246220
247221 steps :
248- - uses : actions/setup-go@v5
249- with :
250- go-version : ${{ env.GO_VERSION }}
251- cache : false # see actions/setup-go#368
252-
253222 - uses : actions/checkout@v4
254223 with :
255224 path : src/github.com/containerd/containerd
256225
226+ - uses : ./.github/actions/install-go
227+
257228 - uses : actions/checkout@v4
258229 with :
259230 repository : kubernetes-sigs/cri-tools
@@ -409,12 +380,8 @@ jobs:
409380 env :
410381 GOTEST : gotestsum --
411382 steps :
412- - uses : actions/setup-go@v5
413- with :
414- go-version : ${{ env.GO_VERSION }}
415- cache : false # see actions/setup-go#368
416-
417383 - uses : actions/checkout@v4
384+ - uses : ./.github/actions/install-go
418385
419386 - name : Install containerd dependencies
420387 env :
@@ -614,11 +581,8 @@ jobs:
614581 GOTEST : gotestsum --
615582
616583 steps :
617- - uses : actions/setup-go@v5
618- with :
619- go-version : ${{ env.GO_VERSION }}
620- cache : false # see actions/setup-go#368
621584 - uses : actions/checkout@v4
585+ - uses : ./.github/actions/install-go
622586 - run : script/setup/install-gotestsum
623587 - run : script/setup/install-teststat
624588 - name : Tests
0 commit comments