From 66ed87e6665bff82018c40025ca5178e7d06d43d Mon Sep 17 00:00:00 2001 From: teutat3s Date: Tue, 27 Aug 2024 12:37:37 +0200 Subject: [PATCH] ci: avoid garbage collection of checks --- .forgejo/workflows/check.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.forgejo/workflows/check.yml b/.forgejo/workflows/check.yml index fe6890e..0ab1544 100644 --- a/.forgejo/workflows/check.yml +++ b/.forgejo/workflows/check.yml @@ -18,14 +18,20 @@ jobs: # Prevent cache garbage collection by creating GC roots mkdir -p /var/lib/gitea-runner/tankstelle/.local/state/nix/results - for target in $(nix flake show --json --all-systems | jq ' + for target in $(nix flake show --json --all-systems | jq --raw-output ' .["nixosConfigurations"] | to_entries[] | - .key - ' | tr -d '"' + .key' ); do nix --print-build-logs --verbose --accept-flake-config --access-tokens '' \ build --out-link /var/lib/gitea-runner/tankstelle/.local/state/nix/results/"$target" ".#nixosConfigurations.${target}.config.system.build.toplevel" done - nix --print-build-logs --verbose --accept-flake-config --access-tokens '' flake check + for check in $(nix flake show --json --all-systems | jq --raw-output ' + .checks."x86_64-linux" | + to_entries[] | + .key' + ); do + nix --print-build-logs --verbose --accept-flake-config --access-tokens '' \ + build --out-link /var/lib/gitea-runner/tankstelle/.local/state/nix/results/"$check" ".#checks.x86_64-linux.${check}" + done