Fix CI: extract store path from nix build output
All checks were successful
CI / ci (push) Successful in 14m6s
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:
@@ -50,8 +50,11 @@ jobs:
|
|||||||
FAILED=()
|
FAILED=()
|
||||||
for pkg in "${PACKAGES[@]}"; do
|
for pkg in "${PACKAGES[@]}"; do
|
||||||
echo "::group::Building $pkg"
|
echo "::group::Building $pkg"
|
||||||
if OUT_PATH=$(nix build ".#$pkg" --no-link --print-out-paths 2>&1); then
|
# Capture build output, extract store path (last line starting with /nix/store/)
|
||||||
echo "Built: $OUT_PATH"
|
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
|
# Sign the closure
|
||||||
nix store sign --key-file /tmp/signing-key -r "$OUT_PATH"
|
nix store sign --key-file /tmp/signing-key -r "$OUT_PATH"
|
||||||
|
|||||||
Reference in New Issue
Block a user