Skip to content

Commit a8f218f

Browse files
committed
Filter discover to only successfully built check-runs
Hydra posts check-runs at evaluation time before builds complete. When flake.nix changes cause new derivation hashes, the discover step would pick up store paths not yet available in any cache, causing nix-store -r to fail on GH runners. Filter for conclusion=="success" and valid /nix/store/ paths to only validate closures that are actually built and cached.
1 parent af478af commit a8f218f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

.github/workflows/pr-validate.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,14 @@ jobs:
3636
3737
# Pick a representative subset: one -env per platform to keep
3838
# the matrix small (avoids 80+ jobs on every PR push).
39+
# Only include successfully completed builds — Hydra posts
40+
# check-runs at eval time before builds finish, so in-progress
41+
# or failed builds would have store paths not yet in caches.
3942
FILTERED=$(echo "$RUNS" | jq -s -c '
4043
[.[].check_runs[]
4144
| select(.name | endswith("-env"))
45+
| select(.conclusion == "success")
46+
| select(.output.summary | . != null and startswith("/nix/store/"))
4247
| { "config": .name,
4348
"build_path": .output.summary,
4449
"short_name": (.name | sub("^[^.]+\\."; "")) }]

0 commit comments

Comments
 (0)