1
0
Fork 0
mirror of https://github.com/cachix/cachix-action.git synced 2025-06-07 22:57:01 +09:00
Build software only once and put it in a global cache https://cachix.org
Find a file
sander 41f25c0d23
Merge pull request #202 from cachix/dependabot/github_actions/cachix/install-nix-action-31
chore(deps): bump cachix/install-nix-action from 30 to 31
2025-03-11 12:47:41 +00:00
.github chore(deps): bump cachix/install-nix-action from 30 to 31 2025-03-11 00:31:38 +00:00
dist dist: build 2025-03-10 15:25:59 +01:00
src dev: restructure build 2025-01-03 10:12:46 +04:00
.envrc dev: bump envrc 2024-11-22 02:36:57 +04:00
.gitignore Switch to devenv 2023-08-18 14:45:58 +00:00
action.yml dev: restructure build 2025-01-03 10:12:46 +04:00
devenv.lock deps: devenv update 2025-03-10 15:17:35 +01:00
devenv.nix dev: bump devenv 2025-01-03 10:26:49 +04:00
devenv.yaml dev: enable git hooks and lint 2024-11-22 02:42:43 +04:00
LICENSE Split Nix installation into separate action 2019-10-02 16:25:24 +02:00
package.json deps: pnpm update 2025-03-10 15:24:48 +01:00
pnpm-lock.yaml deps: pnpm update 2025-03-10 15:24:48 +01:00
README.md dev: switch to pnpm 2025-01-03 10:19:32 +04:00
test-with-arg.nix dev: enable git hooks and lint 2024-11-22 02:42:43 +04:00
test.nix ci: bump nixpkgs 2024-12-06 01:18:53 +04:00
tsconfig.json dev: restructure build 2025-01-03 10:12:46 +04:00

cachix-action

github actions badge

One nice benefit of Nix is that CI can build and cache developer environments for every project on every branch using binary caches.

Another important aspect of CI is the feedback loop of how many minutes does the build take to finish.

With a simple configuration using Cachix, youll never have to build any derivation twice and share them with all your developers.

After each job, just built derivations are pushed to your binary cache.

Before each job, derivations to be built are first substituted (if they exist) from your binary cache.

Getting started

Follow Continuous Integration with GitHub Actions tutorial.

See action.yml for all options.

Security

Cachix auth token and signing key need special care as they give read and write access to your caches.

As per GitHub Actions' security model:

You can use and read secrets in a workflow file if you have access to edit the file.

Which means all developers with write/push access can read your secrets and write to your cache.

Pull requests from forks do not have access to secrets so read access to a public binary cache will work, but pushing will be disabled since there is no signing key.

Note that malicious code submitted via forked pull request can, once merged into master, reveal tokens.

Hacking

Install the dependencies

$ pnpm install

Build the typescript

$ pnpm build