@@ -7,7 +7,7 @@ description: >
77 so the store never accumulates across runs the way a sticky disk did. Trimming
88 before save would only delete the unrooted crane deps and force a recompile, so
99 we let cache-nix-action save the whole non-substitutable set as-is and rely on
10- purge to roll off stale entries.
10+ Blacksmith to evict stale entries.
1111inputs :
1212 cache-scope :
1313 description : >
@@ -28,27 +28,22 @@ runs:
2828
2929 # github.workflow is included so workflows that share a job id (e.g.
3030 # build-native-packages in both ci.yaml and release.yaml) do not collide on
31- # the same primary-key / purge-prefix and evict each other's entries.
31+ # the same primary-key and block each other from saving updated entries.
3232 - name : Cache Nix store
3333 uses : nix-community/cache-nix-action@7df957e333c1e5da7721f60227dbba6d06080569 # v7.0.2
3434 with :
3535 # The commit sha is appended so every commit writes a fresh entry:
3636 # cache-nix-action skips saving on an exact primary-key hit, so a key that
3737 # only depended on the deps hash would persist the first run's store
3838 # forever. restore-prefixes-first-match (without the sha) then restores
39- # the newest prior entry to warm the deps. The cache backend is
40- # effectively unlimited, so one entry per commit is fine and `purge`
41- # rolls off the old ones.
39+ # the newest prior entry to warm the deps. Blacksmith handles stale cache
40+ # eviction without the GitHub REST API used by this action's purge mode.
4241 # package.json only supplies the final binary version. It is excluded
4342 # because release bumps do not change the deps-only Crane derivation.
4443 # Likewise, checks and developer-tooling modules do not affect Cargo
4544 # artifacts; only package modules participate in this key.
4645 primary-key : nix-${{ github.workflow }}-${{ github.job }}-${{ inputs.cache-scope }}-${{ hashFiles('flake.lock', 'flake.nix', 'default.nix', 'package.nix', 'nix/packages.nix', 'nix/static-package.nix', 'nix/darwin-x64-package.nix', 'rust-toolchain.toml', 'rust/Cargo.lock', 'rust/**/Cargo.toml') }}-${{ github.sha }}
4746 restore-prefixes-first-match : nix-${{ github.workflow }}-${{ github.job }}-${{ inputs.cache-scope }}-${{ hashFiles('flake.lock', 'flake.nix', 'default.nix', 'package.nix', 'nix/packages.nix', 'nix/static-package.nix', 'nix/darwin-x64-package.nix', 'rust-toolchain.toml', 'rust/Cargo.lock', 'rust/**/Cargo.toml') }}-
48- purge : true
49- purge-prefixes : nix-${{ github.workflow }}-${{ github.job }}-${{ inputs.cache-scope }}-
50- purge-created : 172800
51- purge-primary-key : never
5247
5348 - name : Fix single-user Nix store ownership
5449 if : runner.os != 'Windows'
0 commit comments