Skip to content

Commit d00f6ed

Browse files
committed
ci(nix): add Nix store caching to setup-nix action
Add nix-community/cache-nix-action to cache the Nix store between CI runs. This speeds up subsequent builds by avoiding redundant downloads and builds of Nix dependencies. The cache key is based on the runner OS (e.g. nix-Linux, nix-macOS).
1 parent ad101a3 commit d00f6ed

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ runs:
88
with:
99
github_access_token: ${{ github.token }}
1010

11+
- name: Cache Nix store
12+
uses: nix-community/cache-nix-action@b426b118b6dc86d6952988d396aa7c6b09776d08 # v7
13+
with:
14+
primary-key: nix-${{ runner.os }}
15+
1116
- name: Setup Cachix (numtide)
1217
uses: cachix/cachix-action@0fc020193b5a1fa3ac4575aa3a7d3aa6a35435ad # v16
1318
with:

0 commit comments

Comments
 (0)