forked from pub-solar/infra
ci: update results path to prevent garbage collection
This commit is contained in:
parent
5aa1276e85
commit
b039dec111
|
@ -16,6 +16,8 @@ jobs:
|
|||
run: |
|
||||
set -exuo pipefail
|
||||
# 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 '
|
||||
.["nixosConfigurations"] |
|
||||
to_entries[] |
|
||||
|
@ -23,7 +25,7 @@ jobs:
|
|||
' | tr -d '"'
|
||||
); do
|
||||
nix --print-build-logs --verbose --accept-flake-config --access-tokens '' \
|
||||
build --out-link ./result-"$target" ".#nixosConfigurations.${target}.config.system.build.toplevel"
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue