wip: test hashing flake.lock file
Some checks reported warnings
Flake checks / Check (pull_request) Has been cancelled

This commit is contained in:
teutat3s 2023-12-11 20:43:02 +01:00
parent dc950eb56f
commit 4f6a1068b7
Signed by: teutat3s
GPG key ID: 4FA1D3FA524F22C1

View file

@ -17,18 +17,23 @@ jobs:
substituters = https://cache.nixos.org/ https://nix-community.cachix.org
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
keep-outputs = true
- name: Calculate flake.lock hash
id: flake-lock-hash
run: |
echo "hash=$(md5sum flake.lock)" >> $GITHUB_OUTPUT
- name: Restore and cache Nix store
uses: https://github.com/nix-community/cache-nix-action@v4
id: nix-store-cache # use this to check for `cache-hit` (`steps.nix-store-cache.outputs.cache-hit != 'true'`)
with:
key: cache-x86_64-linux-nix-store
key: cache-x86_64-linux-nix-store-${{ steps.flake-lock-hash.outputs.hash }}
restore-keys: |
cache-x86_64-linux-
cache-x86_64-linux-nix-store-
gc-linux: true
gc-max-store-size-linux: 10000000000
purge-caches: true
purge-key: cache-x86_64-linux-
purge-key: cache-x86_64-linux-nix-store-
purge-created: true
purge-created-max-age: 42
- name: Check out repository code