Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache doesn't work with Go 1.14 #304

Closed
2 of 5 tasks
barrettj12 opened this issue Dec 13, 2022 · 4 comments
Closed
2 of 5 tasks

Cache doesn't work with Go 1.14 #304

barrettj12 opened this issue Dec 13, 2022 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@barrettj12
Copy link

Description:
When I use this action with Go 1.14 and the cache enabled, it fails with

Error: Could not get cache folder paths.

Action version:
v3

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Tools version:

Go 1.14

Repro steps:
Run the following step:

      uses: actions/setup-go@v3
      with:
        go-version: 1.14
        cache: true

See sample test run here:
https://github.com/canonical/pebble/actions/runs/3681163227/jobs/6227686103

@barrettj12 barrettj12 added bug Something isn't working needs triage labels Dec 13, 2022
@dmitry-shibanov
Copy link
Contributor

Hello @barrettj12. Thank you for your report. We'll investigate the issue.

@e-korolevskii
Copy link
Contributor

Hello @barrettj12

I think the problem is that we use the GOMODCACHE and GOCACHE variables to implement the cache function. But in go 1.14, the GOMODCACHE variable is missing.

@e-korolevskii e-korolevskii self-assigned this Dec 13, 2022
@barrettj12
Copy link
Author

Yeah, seems for Go <= 1.14, the default should be $GOPATH/pkg/mod.

@e-korolevskii
Copy link
Contributor

Hello @barrettj12

Thanks for your report! It's fixed now! The changes will be available in the next release.
I am closing this issue for now!

rkoesters added a commit to rkoesters/xkcd that referenced this issue Mar 10, 2023
actions/setup-go#304 has been fixed in main,
but we won't get the fix until the next release.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants