This is for the docs:
If the job completes successfully, the action creates a new cache with the contents of the path directory.
In some cases it could be useful to store cache key even if some build steps are failed. Could you please define a new option that allows us to use such behavior?
Or maybe go around and allow users to specify where to insert the "save cache" step for better control, e.g., save cache between step N and step N+1, so when step N fails the cache is discarded while the failure of step N+1 doesn't affect cache saving.
@sergeyzwezdin In case anyone finds this via search, this is relatively easy to do. You can fork this repo, remove one line in action.yml, and voila! Here is my own repo / commit that does this: https://github.com/jakemwood/cache/commit/d8a0d1ca35dc43ea043cfd82c5800c56a1e587a7
@jakemwood I don鈥檛 want to support my own repo for this 馃檪
We are investigating using RuboCop and if there are lint failures, the cache would not be updated, which doesn't make sense. In fact, I can't think of many situations where just because a build step fails, the cache should not be updated... At the very least, can we expose this as a configuration option?
Duplicate of https://github.com/actions/cache/issues/92, right?
Most helpful comment
Or maybe go around and allow users to specify where to insert the "save cache" step for better control, e.g., save cache between step N and step N+1, so when step N fails the cache is discarded while the failure of step N+1 doesn't affect cache saving.