ci: try to enable cache for nix store
Some checks failed
Flake checks / Check (pull_request) Failing after 23m55s

This commit is contained in:
teutat3s 2023-11-18 19:46:02 +01:00
parent 0e83deff1b
commit 766f1fa6a2
Signed by: teutat3s
GPG key ID: 4FA1D3FA524F22C1

View file

@ -7,6 +7,15 @@ jobs:
steps:
- name: Check out repository code
uses: https://code.forgejo.org/actions/checkout@v4
- name: "Cache Nix store"
uses: actions/cache@v3.3.2
id: nix-cache
with:
path: /tmp/nixcache
key: "cache-nix-store"
- name: "Import Nix store cache"
if: "steps.nix-cache.outputs.cache-hit == 'true'"
run: "nix-store --import < /tmp/nixcache"
- name: Prepare cachix
uses: https://github.com/cachix/cachix-action@v12
with:
@ -15,3 +24,6 @@ jobs:
- name: Run flake checks
run: |
nix --print-build-logs --verbose --accept-flake-config flake check
- name: "Export Nix store cache"
if: "steps.nix-cache.outputs.cache-hit != 'true'"
run: "nix-store --export $(find /nix/store -maxdepth 1 -name '*-*') > /tmp/nixcache"