cachix-action: Should not run `nix-build` unconditionally
I’d like to be able to use cachix-action when testing a non-Nix project, but it appears to run nix-build unconditionally. Ideally, IMO, the action should install cachix and enable the named cache, but should not assume that the current project is to be built.
https://github.com/purcell/package-lint/blob/nix-actions/.github/workflows/test.yml
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 2
- Comments: 15 (8 by maintainers)
Could you try with:
I also have a use for this if I understand correctly. I nix-install a few things and then run some tests in a shell script with emacs my small (for now) repo.
Since nix-build is called I get an error, but I’m imagining there’s a way to just call my shell script in a nix expression that would make this work okay.
Understood. I don’t think there’d be more than two modes, so why not just have
build: false, to override the default oftrue? In the meantime, for my use case in an action I wrote, I’ve inlined the cachix installation andcachix useinvocation.