-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 entry from default branch considered out of scope for reusable workflow run on tag #1491
Comments
I think I figured this out. The GitHub Actions cache version includes the path and does not disambiguate equivalent paths. Therefore the relative path |
I'm also struggling with this. On a (non-default) branch
But soon after, when the tip commit of this branch gets tagged, triggering another run, actions/cache says:
This cache is absolutely there, I can see it on How do I get this to work? Tag-triggered workflow to pick up cache created on the same branch? @SanjayVas did you figure it out? I don't think relative/absolute paths is relevant; in my case it is a "non-reusable" workflow yaml, so the Dear @Link-, @jww3, any insight from you as the last releasers? |
I have the same problem
The cache has limited use and will bloat if I need to create it upon every release |
Yes. My issue was indeed that the workflow that saves the cache used the relative path, whereas the action that restores the cache used the absolute path. Since I didn't write the action, I updated my saving workflow to use the absolute path as well. This resolved the issue for me. |
Well, I believe the issue is much wider, and not related to paths. In particular, because what helped me was pinning to 4.0.2: - uses: actions/cache@v4
+ uses: actions/cache@v4.0.2 # pinned due to https://github.com/actions/cache/issues/1491 This implies that somewhere in v4.0.2..v4.1.2 a new bug was released. Steps to reproduce
Expected resultCache works: can and does restore existing cache entries. Actual result
|
According to Restrictions for accessing a cache:
I have a reusable workflow that is called from a workflow that runs on a tag ref. It's not finding the cache entry from the default branch (
main
in my case).Both workflows run on
ubuntu-latest
, so this should not be a cross-OS issue.The text was updated successfully, but these errors were encountered: