ci: revert cache-nix-action to version 4.0.3

pull/152/head
teutat3s 2024-04-23 12:03:16 +02:00
parent d5fe65b60d
commit c4d0d34807
Signed by: teutat3s
GPG Key ID: 4FA1D3FA524F22C1
1 changed files with 16 additions and 7 deletions

View File

@ -24,20 +24,20 @@ jobs:
echo "hash=$(md5sum flake.lock | awk '{print $1}')" >> $GITHUB_OUTPUT
- name: Restore and cache Nix store
uses: https://github.com/nix-community/cache-nix-action@v5
uses: https://github.com/nix-community/cache-nix-action@v4.0.3
id: nix-store-cache
with:
primary-key: cache-${{ runner.os }}-nix-store-${{ steps.flake-lock-hash.outputs.hash }}
restore-prefixes-first-match: |
key: cache-${{ runner.os }}-nix-store-${{ steps.flake-lock-hash.outputs.hash }}
restore-keys: |
cache-${{ runner.os }}-nix-store-
gc-linux: true
gc-max-store-size-linux: 10000000000
purge: true
purge-prefixes: cache-${{ runner.os }}-nix-store-
purge-created: 42
purge-primary-key: never
purge-caches: true
purge-key: cache-${{ runner.os }}-nix-store-
purge-created: true
purge-created-max-age: 42
- name: Prepare cachix
uses: https://github.com/cachix/cachix-action@v14
@ -49,3 +49,12 @@ jobs:
- name: Run flake checks
run: |
nix --print-build-logs --verbose --accept-flake-config --access-tokens '' flake check
# Prevent cache garbage collection
for target in $(nix flake show --json --all-systems | jq '
.["nixosConfigurations"] |
to_entries[] |
.key
' | tr -d '"'
); do
nix profile install --profile "/nix/var/nix/profiles/$target" ".#nixosConfigurations.${target}.config.system.build.toplevel"
done