Skip to content

Commit c47ecbc

Browse files
authored
Update Nix cache (#10)
* update nix cache * slight comment change * use nix-quick-install-action * fix input
1 parent d151e90 commit c47ecbc

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

.github/workflows/test.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,22 @@ jobs:
1313
steps:
1414
- uses: actions/checkout@v4
1515
with:
16-
submodules: 'recursive'
17-
- uses: cachix/install-nix-action@v26
18-
- uses: DeterminateSystems/magic-nix-cache-action@v4
16+
submodules: "recursive"
17+
- uses: nixbuild/nix-quick-install-action@8505cd40ae3d4791ca658f2697c5767212e5ce71 # v30
18+
with:
19+
nix_conf: |
20+
keep-env-derivations = true
21+
keep-outputs = true
22+
- name: Nix cache
23+
uses: nix-community/cache-nix-action@135667ec418502fa5a3598af6fb9eb733888ce6a # v6
24+
with:
25+
# restore and save a cache using this key.
26+
primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix', '**/flake.lock') }}
27+
# if there's no cache hit, restore a cache by this prefix.
28+
restore-prefixes-first-match: nix-${{ runner.os }}-
29+
# collect garbage until the Nix store size (in bytes) is at most this number
30+
# before trying to save a new cache.
31+
gc-max-store-size-linux: 2G
1932
- name: Ensure flake.lock was committed
2033
run: ls flake.lock
2134
- run: nix flake check -L

0 commit comments

Comments
 (0)