use better primary key
This commit is contained in:
parent
ddf31fb77a
commit
806390e22e
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,7 +53,7 @@ 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 }}-${{ hashFiles('flake.lock') }}
|
primary-key: nix-${{ runner.os }}-${{ matrix.machine }}-${{ hashFiles('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 }}-
|
||||||
# do purge caches
|
# do purge caches
|
||||||
|
@ -67,7 +67,7 @@ jobs:
|
||||||
# always save the cache
|
# always save the cache
|
||||||
save-always: true
|
save-always: true
|
||||||
|
|
||||||
- run: nix build -L --accept-flake-config .#nixosConfigurations.${{ matrix.machine }}.config.system.build.toplevel
|
- run: nix build -L .#nixosConfigurations.${{ matrix.machine }}.config.system.build.toplevel
|
||||||
|
|
||||||
build-homes:
|
build-homes:
|
||||||
strategy:
|
strategy:
|
||||||
|
@ -119,7 +119,7 @@ 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 }}-${{ hashFiles('flake.lock') }}
|
primary-key: nix-${{ runner.os }}-${{ matrix.home }}-${{ hashFiles('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 }}-
|
||||||
# do purge caches
|
# do purge caches
|
||||||
|
@ -133,4 +133,4 @@ jobs:
|
||||||
# always save the cache
|
# always save the cache
|
||||||
save-always: true
|
save-always: true
|
||||||
|
|
||||||
- run: nix build -L --accept-flake-config .#homeConfigurations."${{ matrix.home }}".activationPackage
|
- run: nix build -L .#homeConfigurations."${{ matrix.home }}".activationPackage
|
||||||
|
|
Loading…
Add table
Reference in a new issue