Always cache files and save them #26467
-
Hello! I need cache to be restored and saved again every time the job ends. How to do this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @ghost6482 , When cache-hit value is false, the cache will be restored and saved again. Code sample as below:
I added ${{githu.sha}} to make sure the key is different for each commit, which will cause ‘cache-hit’ value is ‘false’. Cache restored: https://github.com/weide-zhou/github-actions-for-packages/runs/620991567?check_suite_focus=true#step:3:13 Cache saved: https://github.com/weide-zhou/github-actions-for-packages/runs/620991567?check_suite_focus=true#step:9:3 Hope it’s clear and helpful. |
Beta Was this translation helpful? Give feedback.
Hi @ghost6482 ,
When cache-hit value is false, the cache will be restored and saved again. Code sample as below:
I added ${{githu.sha}} to make sure the key is different for each co…