From 3a460a9f58319126218d5d067fa46c3251d976b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Sat, 27 Apr 2024 12:16:38 +0100 Subject: [PATCH] try nix cache action --- .gitea/workflows/build.yaml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 287275f6..f689922d 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -9,7 +9,26 @@ jobs: steps: - uses: actions/checkout@v3 name: Checkout - - uses: https://github.com/DeterminateSystems/magic-nix-cache-action@main + - uses: nixbuild/nix-quick-install-action@v27 + + - name: Restore and cache Nix store + uses: https://github.com/nix-community/cache-nix-action@v5 + with: + # restore and save a cache using this key + primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix') }} + # if there's no cache hit, restore a cache by this prefix + restore-prefixes-first-match: nix-${{ runner.os }}- + # collect garbage until Nix store size (in bytes) is at most this number + # before trying to save a new cache + gc-max-store-size-linux: 1073741824 + # do purge caches + purge: true + # purge all versions of the cache + purge-prefixes: cache-${{ runner.os }}- + # created more than this number of seconds ago relative to the start of the `Post Restore` phase + purge-created: 0 + # except the version with the `primary-key`, if it exists + purge-primary-key: never - name: Metadata run: | nix flake metadata