From ae096e75897e35410440691cabd7bc71977ba71e Mon Sep 17 00:00:00 2001 From: mayor Date: Thu, 12 Feb 2026 22:02:12 -0800 Subject: [PATCH] Fix CI: extract store path from nix build output 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 --- .gitea/workflows/ci.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 2fabc77..acd4456 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -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"