@@ -14,13 +14,14 @@ jobs:
14
14
name : Lint
15
15
runs-on : ubuntu-latest
16
16
steps :
17
+ - name : Checkout code into the Go module directory
18
+ uses : actions/checkout@v3
19
+
17
20
- name : Set up Go
18
21
uses : actions/setup-go@v3
19
22
with :
20
23
go-version : ${{ env.GO_VERSION }}
21
-
22
- - name : Checkout code into the Go module directory
23
- uses : actions/checkout@v2
24
+ cache : true
24
25
25
26
- name : Validate go-mod is up-to-date and license headers
26
27
run : make validate
@@ -38,18 +39,14 @@ jobs:
38
39
runs-on : ubuntu-latest
39
40
if : github.ref == 'refs/heads/main'
40
41
steps :
42
+ - name : Checkout code into the Go module directory
43
+ uses : actions/checkout@v3
44
+
41
45
- name : Set up Go
42
46
uses : actions/setup-go@v3
43
47
with :
44
48
go-version : ${{ env.GO_VERSION }}
45
-
46
- - name : Checkout code into the Go module directory
47
- uses : actions/checkout@v2
48
-
49
- - uses : actions/cache@v2
50
- with :
51
- path : ~/go/pkg/mod
52
- key : go-${{ hashFiles('**/go.sum') }}
49
+ cache : true
53
50
54
51
# Ensure we don't discover cross platform build issues at release time.
55
52
# Time used to build linux here is gained back in the build for local E2E step
@@ -60,10 +57,14 @@ jobs:
60
57
name : Build
61
58
runs-on : ubuntu-latest
62
59
steps :
60
+ - name : Checkout code into the Go module directory
61
+ uses : actions/checkout@v3
62
+
63
63
- name : Set up Go
64
64
uses : actions/setup-go@v3
65
65
with :
66
66
go-version : ${{ env.GO_VERSION }}
67
+ cache : true
67
68
68
69
- name : Set up gosum
69
70
run : |
74
75
curl https://download.docker.com/linux/static/stable/x86_64/docker-20.10.3.tgz | tar xz
75
76
sudo cp ./docker/docker /usr/bin/ && rm -rf docker && docker version
76
77
77
- - name : Checkout code into the Go module directory
78
- uses : actions/checkout@v2
79
-
80
- - uses : actions/cache@v2
81
- with :
82
- path : ~/go/pkg/mod
83
- key : go-${{ hashFiles('**/go.sum') }}
84
-
85
78
- name : Test
86
79
env :
87
80
BUILD_TAGS : kube
0 commit comments