@@ -14,13 +14,14 @@ jobs:
1414 name : Lint
1515 runs-on : ubuntu-latest
1616 steps :
17+ - name : Checkout code into the Go module directory
18+ uses : actions/checkout@v3
19+
1720 - name : Set up Go
1821 uses : actions/setup-go@v3
1922 with :
2023 go-version : ${{ env.GO_VERSION }}
21-
22- - name : Checkout code into the Go module directory
23- uses : actions/checkout@v2
24+ cache : true
2425
2526 - name : Validate go-mod is up-to-date and license headers
2627 run : make validate
@@ -38,18 +39,14 @@ jobs:
3839 runs-on : ubuntu-latest
3940 if : github.ref == 'refs/heads/main'
4041 steps :
42+ - name : Checkout code into the Go module directory
43+ uses : actions/checkout@v3
44+
4145 - name : Set up Go
4246 uses : actions/setup-go@v3
4347 with :
4448 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
5350
5451 # Ensure we don't discover cross platform build issues at release time.
5552 # Time used to build linux here is gained back in the build for local E2E step
@@ -60,10 +57,14 @@ jobs:
6057 name : Build
6158 runs-on : ubuntu-latest
6259 steps :
60+ - name : Checkout code into the Go module directory
61+ uses : actions/checkout@v3
62+
6363 - name : Set up Go
6464 uses : actions/setup-go@v3
6565 with :
6666 go-version : ${{ env.GO_VERSION }}
67+ cache : true
6768
6869 - name : Set up gosum
6970 run : |
7475 curl https://download.docker.com/linux/static/stable/x86_64/docker-20.10.3.tgz | tar xz
7576 sudo cp ./docker/docker /usr/bin/ && rm -rf docker && docker version
7677
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-
8578 - name : Test
8679 env :
8780 BUILD_TAGS : kube
0 commit comments