IssueRaiser

Allow updating an existing cache

GitHub actions supports caching across builds which is super powerful. However, once a cache has been saved it can no longer be modified. While this is fine for most scenarios where you need the cache there are a few times when you would like to update it. I created this PR on the actual cache action to allow updating a cache when providing it in configuration: https://github.com/actions/cache/pull/353 I created it after reading the related issue: https://github.com/actions/cache/issues/342 However, it seems like something either needs to change in this package or server-side on the actions cache. My use-case for wanting to update a cache is when using GitHub actions in golang projects. Go supports a test cache which allows tests to be skipped if the code they use has not changed, which can significantly improve test times (especially in large projects). Each time I run my tests, I'd like to maintain a single cache for tests, that way, when a run completes I can update the cache and all my workflows share a single test cache There are some extra use-cases described on the issue above.

Posted by davidsbond on Jun 25, 2020, 3:37 PM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.3,500 issues0 comments

github (Sysadmin)

Allow updating an existing cache

davidsbondJun 25, 2020, 3:37 PM

GitHub actions supports caching across builds which is super powerful. However, once a cache has been saved it can no longer be modified. While this is fine for most scenarios where you need the cache there are a few times when you would like to update it. I created this PR on the actual cache action to allow updating a cache when providing it in configuration: https://github.com/actions/cache/pull/353 I created it after reading the related issue: https://github.com/actions/cache/issues/342 However, it seems like something either needs to change in this package or server-side on the actions cache. My use-case for wanting to update a cache is when using GitHub actions in golang projects. Go supports a test cache which allows tests to be skipped if the code they use has not changed, which can significantly improve test times (especially in large projects). Each time I run my tests, I'd like to maintain a single cache for tests, that way, when a run completes I can update the cache and all my workflows share a single test cache There are some extra use-cases described on the issue above.

Comments (0)

No comments yet. Start the discussion.

Comment on this issue