cache-nix-action
cache-nix-action copied to clipboard
How to store cache even if some step fails?
Hi, thanks for this awesome action!
The question is how do I store the nix store even if some step is failing in the CI?
You may allow a step to fail using continue-on-error.
@deemp the pipeline proceeds after failing, but the cache is not restored. Please reopen
Please, try the latest version of cache-nix-action and provide logs from both phases (the first and the post phases).
@hissssst, there's now the save-always input (see Inputs).
save-always: true is not working
@hissssst, yes. This problem is tracked in https://github.com/nix-community/cache-nix-action/issues/36 with more details
@hissssst, as it was suggested in https://github.com/actions/cache/issues/1315#issuecomment-2163822166, you can use separate restore and save steps.