Closed mnmaita closed 3 weeks ago
Hi! Unfortunately that is a restriction of Github, not something on our end. Caches created on branches can only be used by their direct children. Please see this article for more details.
I'm recommend making cached jobs run on push to the main branch. Then, that cache can be used by all pull requests.
Thanks, this is exactly what I needed to know!
I'm using this action to cache my dev builds and then reuse them whenever someone pushes a new pull request.
Using
cache-groups
so the same job/s use the same cache. But whenever I'm pushing a new ref and opening a new PR, the action will create a new cache with the exact same name and report there was no cache hit.Is this intended because it's being triggered from different runs even though it's the same workflow and job doing it?