From 9e525baa32c3c06ffb6c1e9705724c3ec2d2572d Mon Sep 17 00:00:00 2001 From: teutat3s Date: Wed, 13 Dec 2023 01:35:44 +0100 Subject: [PATCH] wip: final --- .forgejo/workflows/check.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.forgejo/workflows/check.yml b/.forgejo/workflows/check.yml index c37ae36..3289920 100644 --- a/.forgejo/workflows/check.yml +++ b/.forgejo/workflows/check.yml @@ -9,9 +9,11 @@ jobs: steps: - name: Check out repository code uses: https://code.forgejo.org/actions/checkout@v4 + - name: Install dependencies run: | sudo apt-get update && sudo apt-get install --yes zstd jq + - uses: https://github.com/nixbuild/nix-quick-install-action@v26 with: load_nixConfig: false @@ -19,10 +21,12 @@ 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 | awk '{print $1}')" >> $GITHUB_OUTPUT + - name: Restore and cache Nix store uses: https://github.com/nix-community/cache-nix-action@v4 id: nix-store-cache @@ -35,19 +39,16 @@ jobs: gc-max-store-size-linux: 10000000000 purge-caches: true - purge-keys: | - cache-x86_64-${{ runner.os }}-nix-store- - cache-${{ runner.os }}-nix-store- + purge-keys: cache-${{ runner.os }}-nix-store- purge-created: true purge-created-max-age: 42 - - name: echo if no cache hit - if: steps.nix-store-cache.outputs.cache-hit != 'true' - run: echo no cache hit + - name: Prepare cachix uses: https://github.com/cachix/cachix-action@v12 with: name: pub-solar authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' + - name: Run flake checks run: | nix --print-build-logs --verbose --accept-flake-config flake check