ci: try to enable cache for nix store
Some checks failed
Flake checks / Check (pull_request) Failing after 23m55s
Some checks failed
Flake checks / Check (pull_request) Failing after 23m55s
This commit is contained in:
parent
0e83deff1b
commit
766f1fa6a2
|
@ -7,6 +7,15 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository code
|
- name: Check out repository code
|
||||||
uses: https://code.forgejo.org/actions/checkout@v4
|
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
|
- name: Prepare cachix
|
||||||
uses: https://github.com/cachix/cachix-action@v12
|
uses: https://github.com/cachix/cachix-action@v12
|
||||||
with:
|
with:
|
||||||
|
@ -15,3 +24,6 @@ jobs:
|
||||||
- name: Run flake checks
|
- name: Run flake checks
|
||||||
run: |
|
run: |
|
||||||
nix --print-build-logs --verbose --accept-flake-config flake check
|
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"
|
||||||
|
|
Loading…
Reference in a new issue