Skip to content

Commit 6c38298

Browse files
authored
ci(nix): add Nix store caching to setup-nix action (#268)
* 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). * ci(nix): replace cachix with cache-nix-action Remove cachix-action in favour of nix-community/cache-nix-action for caching the Nix store. Also update install-nix-action to v31.9.0. This simplifies the caching setup and aligns with stackone-ai-python.
1 parent e7617aa commit 6c38298

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

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

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
name: 'Setup Nix'
2-
description: 'Install Nix and configure Cachix'
2+
description: 'Install Nix and configure cache'
33
runs:
44
using: 'composite'
55
steps:
66
- name: Install Nix
7-
uses: cachix/install-nix-action@0b0e072294b088b73964f1d72dfdac0951439dbd # v31.8.4
7+
uses: cachix/install-nix-action@4e002c8ec80594ecd40e759629461e26c8abed15 # v31.9.0
88
with:
99
github_access_token: ${{ github.token }}
1010

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

1716
- name: Load Nix development environment
1817
shell: bash

0 commit comments

Comments
 (0)