Skip to content

Commit 168a2b4

Browse files
aaurenmrueg
authored andcommitted
fix(ci): checkout before go setup
In setup-go@v4 it changed to enabling caching by default which looks for a go modules file to check the cache. This means that the checkout needs to be processed before the setup-go action.
1 parent 39ff9f6 commit 168a2b4

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

.github/workflows/ci.yml

+12-12
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ jobs:
2323
name: ci-go-lint
2424
runs-on: ubuntu-latest
2525
steps:
26+
- name: Check out code into the Go module directory
27+
uses: actions/checkout@v3
28+
2629
- name: Set up Go 1.x
2730
uses: actions/setup-go@v4
2831
with:
2932
go-version: ${{ env.GO_VERSION }}
3033
id: go
3134

32-
- name: Check out code into the Go module directory
33-
uses: actions/checkout@v3
34-
3535
- name: Lint kube-router code
3636
run: |
3737
make lint
@@ -41,15 +41,15 @@ jobs:
4141
name: ci-unit-tests
4242
runs-on: ubuntu-latest
4343
steps:
44+
- name: Check out code into the Go module directory
45+
uses: actions/checkout@v3
46+
4447
- name: Set up Go 1.x
4548
uses: actions/setup-go@v4
4649
with:
4750
go-version: ${{ env.GO_VERSION }}
4851
id: go
4952

50-
- name: Check out code into the Go module directory
51-
uses: actions/checkout@v3
52-
5353
- name: Run unit tests for kube-router
5454
run: |
5555
make test
@@ -61,15 +61,15 @@ jobs:
6161
name: ci-build-kube-router
6262
runs-on: ubuntu-latest
6363
steps:
64+
- name: Check out code into the Go module directory
65+
uses: actions/checkout@v3
66+
6467
- name: Set up Go 1.x
6568
uses: actions/setup-go@v4
6669
with:
6770
go-version: ${{ env.GO_VERSION }}
6871
id: go
6972

70-
- name: Check out code into the Go module directory
71-
uses: actions/checkout@v3
72-
7373
- name: Build kube-router
7474
run: |
7575
make kube-router
@@ -177,15 +177,15 @@ jobs:
177177
runs-on: ubuntu-latest
178178
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
179179
steps:
180+
- name: Check out code into the Go module directory
181+
uses: actions/checkout@v3
182+
180183
- name: Set up Go 1.x
181184
uses: actions/setup-go@v4
182185
with:
183186
go-version: ${{ env.GO_VERSION }}
184187
id: go
185188

186-
- name: Check out code into the Go module directory
187-
uses: actions/checkout@v3
188-
189189
- name: Run GoReleaser
190190
uses: goreleaser/goreleaser-action@v4
191191
with:

0 commit comments

Comments
 (0)