mirror of
https://github.com/DeterminateSystems/magic-nix-cache-action.git
synced 2024-12-25 17:08:32 +01:00
Save 30-50%+ of CI time without any effort or cost. Use Magic Nix Cache, a totally free and zero-configuration binary cache for Nix on GitHub Actions.
21c3863b07
Co-authored-by: Zhaofeng Li <hello@zhaofeng.li> |
||
---|---|---|
.github | ||
dist | ||
src | ||
.envrc | ||
.gitattributes | ||
.gitignore | ||
action.yml | ||
bun.lockb | ||
flake.lock | ||
flake.nix | ||
justfile | ||
LICENSE | ||
package.json | ||
README.md | ||
rollup.config.js | ||
shell.nix | ||
tsconfig.json |
The Magic Nix Cache Action
Cut CI time by 50% or more by caching to GitHub Actions' cache, for free. No configuration required.
name: Flake Check
on:
pull_request:
push:
branches: [main]
jobs:
flake-check:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: DeterminateSystems/flake-checker-action@v4
with:
fail-mode: true
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v4
- uses: DeterminateSystems/nix-installer-action-cache@focus-on-cache
- name: "Nix Flake Check"
run: nix flake check . -L
Parameter | Description | Required | Default |
---|---|---|---|
diagnostic-endpoint |
Diagnostic endpoint url where diagnostics and performance data is sent. To disable set this to an empty string. | https://install.determinate.systems/magic-nix-cache/perf | |
listen |
The host and port to listen on. | 127.0.0.1:37515 | |
source-binary |
Run a version of the cache binary from somewhere already on disk. Conflicts with all other source-* options. |
||
source-branch |
The branch of magic-nix-cache to use. Conflicts with all other source-* options. |
||
source-pr |
The PR of magic-nix-cache to use. Conflicts with all other source-* options. |
||
source-revision |
The revision of nix-magic-nix-cache to use. Conflicts with all other source-* options. |
||
source-tag |
The tag of magic-nix-cache to use. Conflicts with all other source-* options. |
||
source-url |
A URL pointing to a magic-nix-cache binary. Overrides all other source-* options. |
||
upstream-cache |
Your preferred upstream cache. Store paths in this store will not be cached in GitHub Actions' cache. | https://cache.nixos.org |