Skip to content

Commit 13c6919

Browse files
authored
ci(nix): include all Nix files and lockfiles in cache key hash (#275)
Add hashFiles for all *.nix files, flake.lock, and pnpm-lock.yaml to the Nix store cache key. This ensures the cache is properly invalidated when any Nix configuration or dependency lockfiles change.
1 parent 4b5e7e7 commit 13c6919

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/actions/setup-nix/action.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ runs:
1111
- name: Cache Nix store
1212
uses: nix-community/cache-nix-action@b426b118b6dc86d6952988d396aa7c6b09776d08 # v7.0.0
1313
with:
14-
primary-key: nix-${{ runner.os }}
14+
primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix', 'flake.lock', 'pnpm-lock.yaml') }}
1515

1616
- name: Load Nix development environment
1717
shell: bash

0 commit comments

Comments
 (0)