Skip to content

Commit badccff

Browse files
authored
Disable cache with golangci
Below errors were seen with setup-go@v4 in golangci Lint: Error: /usr/bin/tar: ../../../go/pkg/mod/sigs.k8s.io/[email protected]/yaml_ test.go: Cannot open: File exists /usr/bin/tar: ../../../go/pkg/mod/sigs.k8s.io/[email protected]/LICENSE: Cannot open: File exists Disabling Cache with golangci solves the problem and makes sure that we are in a reecent setup-go as well. Cache can be enabled once the resultant issue is fixed in golangci lint action repo. Issue that is to be tracked: golangci/golangci-lint-action#135
1 parent 4d668f1 commit badccff

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,14 @@ jobs:
3232
- uses: actions/checkout@v4
3333
- uses: actions/setup-go@v5
3434
with:
35+
# when the files to be extracted are already present,
36+
# tar extraction in Golangci Lint fails with the "File exists"
37+
# errors. These files appear to be present because of
38+
# cache in setup-go, on disabling the cache we are no more seeing
39+
# such error. Cache is to be enabled once the fix is available for
40+
# this issue
3541
go-version: '1.22.2'
42+
cache: false
3643

3744
- name: golangci-lint
3845
uses: golangci/golangci-lint-action@v4

0 commit comments

Comments
 (0)