use more specific primary-key and prefix-match
This commit is contained in:
parent
3a621723d1
commit
a20e15c63a
1 changed files with 4 additions and 4 deletions
8
.github/workflows/build-and-cache.yml
vendored
8
.github/workflows/build-and-cache.yml
vendored
|
@ -53,9 +53,9 @@ jobs:
|
||||||
uses: nix-community/cache-nix-action@v5.1.0
|
uses: nix-community/cache-nix-action@v5.1.0
|
||||||
with:
|
with:
|
||||||
# restore and save a cache using this key
|
# restore and save a cache using this key
|
||||||
primary-key: nix-${{ runner.os }}-${{ matrix.machine }}-${{ hashFiles('flake.lock') }}
|
primary-key: nix-${{ runner.os }}-${{ matrix.machine }}-${{ hashFiles('**/*.nix', 'flake.lock') }}
|
||||||
# if there's no cache hit, restore a cache by this prefix
|
# if there's no cache hit, restore a cache by this prefix
|
||||||
restore-prefixes-first-match: nix-${{ runner.os }}-
|
restore-prefixes-first-match: nix-${{ runner.os }}-${{ matrix.machine }}-
|
||||||
# do purge caches
|
# do purge caches
|
||||||
purge: true
|
purge: true
|
||||||
# purge all versions of the cache
|
# purge all versions of the cache
|
||||||
|
@ -119,9 +119,9 @@ jobs:
|
||||||
uses: nix-community/cache-nix-action@v5.1.0
|
uses: nix-community/cache-nix-action@v5.1.0
|
||||||
with:
|
with:
|
||||||
# restore and save a cache using this key
|
# restore and save a cache using this key
|
||||||
primary-key: nix-${{ runner.os }}-${{ matrix.home }}-${{ hashFiles('flake.lock') }}
|
primary-key: nix-${{ runner.os }}-${{ matrix.home }}-${{ hashFiles('**/*.nix', 'flake.lock') }}
|
||||||
# if there's no cache hit, restore a cache by this prefix
|
# if there's no cache hit, restore a cache by this prefix
|
||||||
restore-prefixes-first-match: nix-${{ runner.os }}-
|
restore-prefixes-first-match: nix-${{ runner.os }}-${{ matrix.home }}-
|
||||||
# do purge caches
|
# do purge caches
|
||||||
purge: true
|
purge: true
|
||||||
# purge all versions of the cache
|
# purge all versions of the cache
|
||||||
|
|
Loading…
Add table
Reference in a new issue