Skip to content

Understanding Cache Action keys #25027

Answered by BrightRan
DannyBen asked this question in Actions
Discussion options

You must be logged in to vote

Caches not only can be shared between workflow runs, you also can share caches between jobs in the same workflow run. So when using github.sha in the key is feasible. The key can be any combination of variables, context values, static strings, and functions.
An ordered list of alternative keys to use for finding the cache if no cache hit occurred for key. If you provide restore-keys, the cache action sequentially searches for any caches that match the list of restore-keys.

  1. When there is an exact match, the action restores the files in the cache to the path directory.
  2. If there are no exact matches, the action searches for partial matches of the restore keys. When the action finds a partia…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants