Is there a simple example of doing a CI build on GitHub in a Flox environment (defined in .flox in the repo), so the GitHub build is using exactly the same dependencies as the developers?
I found install-flox-action, but the example there looks to be building a Nix package rather than a normal build (e.g. via npm build
).
That action gives you flox and Nix ready to use however you want. (Note: it does not activate your env for you.) If your env is committed to your repo, one might do something like flox activate -- npm build
.
If you have an environment defined, you can also take a look GitHub - flox/activate-action: Run command in a Flox environment which will activate the env for you and you only need to run your npm build
.
Worked like a dream, thank you!
1 Like