diff --git a/.forgejo/workflows/check.yml b/.forgejo/workflows/check.yml index 13efab4..b041caf 100644 --- a/.forgejo/workflows/check.yml +++ b/.forgejo/workflows/check.yml @@ -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