I already have a external nix cache for actions which works great but can't be used by external PR's/forks.
magic-nix-cache does work for forks but doesn't do cross-branch caching and can hit github's rate limits.
Ideally I would configure my action to use the external cache for any job that has access to the required secrets and fallback to magic-nix-cache for any job that doesn't.
I could just always enable the magic-nix-cache but it seems wasteful to put extra load on github's cache when the external cache is available.
It is also possible to make steps conditional based on the availability of secrets, it's a bit cumbersome requires more boilerplate that I would like to have to repeat for every job.
It would be nice the the magic-nix-cache action has a builtin option to check for the availability of secrets and disable itself when the secret is set. Something like:
I already have a external nix cache for actions which works great but can't be used by external PR's/forks.
magic-nix-cache does work for forks but doesn't do cross-branch caching and can hit github's rate limits.
Ideally I would configure my action to use the external cache for any job that has access to the required secrets and fallback to magic-nix-cache for any job that doesn't.
I could just always enable the magic-nix-cache but it seems wasteful to put extra load on github's cache when the external cache is available. It is also possible to make steps conditional based on the availability of secrets, it's a bit cumbersome requires more boilerplate that I would like to have to repeat for every job.
It would be nice the the magic-nix-cache action has a builtin option to check for the availability of secrets and disable itself when the secret is set. Something like:
would make it easy to get a "best of both worlds" caching setup with minimal boilerplate.