Skip to content

Commit 69bbe84

Browse files
committed
Disable setup-go cache to avoid warnings
When cache is enabled we always get warnings from tar: usr/bin/tar: ../../../go/pkg/mod/golang.org/x/telemetry/[email protected]/doc.go: Cannot open: File exists /usr/bin/tar: ../../../go/pkg/mod/golang.org/x/telemetry/[email protected]/LICENSE: Cannot open: File exists /usr/bin/tar: ../../../go/pkg/mod/golang.org/x/telemetry/[email protected]/config.json: Cannot open: File exists /usr/bin/tar: ../../../go/pkg/mod/golang.org/x/telemetry/[email protected]/go.mod: Cannot open: File exists /usr/bin/tar: Exiting with failure status due to previous errors Warning: Failed to restore: "/usr/bin/tar" failed with error: The process '/usr/bin/tar' failed with exit code 2 According to setup-go issue[1] the mitigation is to disable the cache. Strangely, when the cache is disabled, the setup-go step is adding go to the cache: Adding to the cache ... Successfully cached go to /opt/hostedtoolcache/go/1.23.0/x64 [1] actions/setup-go#403
1 parent 3a77758 commit 69bbe84

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

.github/workflows/ci.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,6 @@ jobs:
4747
uses: actions/setup-go@v5
4848
with:
4949
go-version: ${{ env.GO_VERSION }}
50+
cache: false
5051
- name: Build binary
5152
run: GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build

0 commit comments

Comments
 (0)