nix-community / cache-nix-action

Cache Nix store in GitHub Actions to speed up workflows [maintainer=@deemp]
MIT License
34 stars 7 forks source link

Integrate purge-cache #10

Closed deemp closed 1 year ago

deemp commented 1 year ago

As Nix flake inputs may change, caches should also change.

To keep cache fresh, we can purge old caches just before saving a new cache. This way, no intermediate steps can lead to cache saving failure.

The action purge-cache can purge old caches. Its code is quite simple and can be integrated into cache-nix-action.

deemp commented 1 year ago

https://github.com/nix-community/cache-nix-action/commit/68694191d996d8e936f15d9df42f3fb6f88aa02f

https://github.com/nix-community/cache-nix-action/commit/ebc6b654f2244da401b5feaf754d9e31fdf3d0db

https://github.com/nix-community/cache-nix-action/commit/a74903a10c7295c3b7830867eefc9c9301c1d6eb