How can I prevent storing cache for pull request branches
I want the cache to be restored and used across all pull request workflows. However, if a pull request introduces changes that modify the cache key, I want to prevent the new value from being stored in the cache.
Hey, are there any leads on this? I've encountered the same problem and would be happy to receive a solution, or has this not been implemented yet?
I want the cache to be restored and used across all pull request workflows. However, if a pull request introduces changes that modify the cache key, I want to prevent the new value from being stored in the cache.
I was digging around, and it looks like this is the solution: https://github.com/actions/cache/blob/main/caching-strategies.md#saving-cache. With using a simple if statement on the save step: github.event_name != 'pull_request'.