Cache always not found (yarn + linux)
See original GitHub issueHello : )
I’ve tried to apply this action to my workflow but it seems like does not work properly.
On the post action step, it completed with Cache saved successfully
. But on the next action event. It always displays Cache not found
with the same key.
Could you please a little bit check on this example link ?
My workflow config:
- name: Get yarn cache
id: yarn-cache
run: |
echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1.1.0
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: yarn-
pkg manager: yarn env: Linux
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Keep getting yarn cache is not found · Issue #410 - GitHub
It can be related to the constant updating of the yarn.lock file, because the yarn install command can update dependencies. It updates the...
Read more >yarn cache
Yarn stores every package in a global cache in your user directory on the file system. yarn cache list will print out every...
Read more >How to cache yarn packages in GitHub Actions - Stack Overflow
Solution 3: Caching node_modules with actions/cache (NOT recommended) · yarn is good at utilizing global cache. If the dependencies are already ...
Read more >How to cache node_modules in GitHub Actions with Yarn
The first step grabs the yarn cache directory path, and saves it. The second step looks for anything stored in the cache, and...
Read more >Yarn caching doesn't work - Visual Studio Feedback
This could result in the task failing when this “file” does not exist. Please check if the “YARN_CACHE_FOLDER” variable is valid. You also...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@joshmgross This looks like an issue with the scope. While this commit is on the master branch, the scopes are referencing the tags, for example
refs/tags/v1.0.30
, instead of the master branch. Thus, it is successfully committing the cache, but unable to find the cache since the scope is different each time.@Cerberus this sounds like something we’ll need to fix on the backend. We’ll keep you up to date.
Thank you for your detailed explanation. : )
Actually I planed to cache it on
master
branch for testing. When I add it, everything should work as expected.