Fix CI: extract store path from nix build output
All checks were successful
CI / ci (push) Successful in 14m6s

nix build outputs progress info to stdout along with the store path.
Filter to only the /nix/store/ line to get the actual path.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
mayor
2026-02-12 22:02:12 -08:00
committed by John Ogle
parent de1a903f1f
commit ae096e7589

View File

@@ -50,8 +50,11 @@ jobs:
FAILED=()
for pkg in "${PACKAGES[@]}"; do
echo "::group::Building $pkg"
if OUT_PATH=$(nix build ".#$pkg" --no-link --print-out-paths 2>&1); then
echo "Built: $OUT_PATH"
# Capture build output, extract store path (last line starting with /nix/store/)
if BUILD_OUTPUT=$(nix build ".#$pkg" --no-link --print-out-paths 2>&1); then
OUT_PATH=$(echo "$BUILD_OUTPUT" | grep '^/nix/store/' | tail -1)
echo "$BUILD_OUTPUT"
echo "Store path: $OUT_PATH"
# Sign the closure
nix store sign --key-file /tmp/signing-key -r "$OUT_PATH"