In your github actions, after installing nix, add the ordinary-nix-cache action like this:
jobs:
build:
steps:
- uses: DeterminateSystems/nix-installer-action@main
- uses: hannesg/ordinary-nix-cache@v0.1.1 # <---- here
- run: nix build ".#devShell.x86_64-linux"
This does three things:
- It starts a small http server that translates the nix remote cache protocol to the github actions cache protocol.
- It sets up this http server as additional nix cache.
- It sets up a
post-buildaction that automatically uploads all nix builds to the github actions cache.
None 😎
Just remove the action from your github actions config.
To purge all caches, you can use gh:
gh cache list --json id -k "nix0" | jq '.[] | .id' | xargs -l gh cache delete
You have to run this a few times because gh gives you only 100 entries per run.
Use nix + direnv to install dependencies dev dependencies.
Use bun to install js dependencies:
bun installRun tests using bun
bun testBundle using bun
bun build --minify --target node index.js > dist/index.mjs