From 332b83935c2c2e1de6f66ac6b5d8312eaee99735 Mon Sep 17 00:00:00 2001 From: "assistant-ngalaiko[bot]" <307087249+assistant-ngalaiko[bot]@users.noreply.github.com> Date: Thu, 13 Aug 2026 00:02:13 +0000 Subject: [PATCH] Improve deploy VM check diagnostics --- .github/workflows/deploy.yaml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 78b99b5..387de5b 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -62,8 +62,16 @@ jobs: - name: Is there a computer VM? id: check run: | - n=$(ssh -i ~/.ssh/id_ed25519 exe.dev ls --l --json \ - | jq -r --arg tag "$VM_TAG" '[.vms[] | select((.tags // []) | index($tag))] | length') + if ! ssh -i ~/.ssh/id_ed25519 exe.dev ls --l --json > vms.json; then + echo "exe.dev VM listing failed" + exit 1 + fi + if ! jq -e . vms.json >/dev/null; then + echo "exe.dev VM listing did not return JSON; raw output follows:" + sed -n '1,80p' vms.json + exit 1 + fi + n=$(jq -r --arg tag "$VM_TAG" '[.vms[] | select((.tags // []) | index($tag))] | length' vms.json) echo "found $n VM(s) tagged $VM_TAG" if [ "$n" -gt 0 ]; then echo "exists=true"; else echo "exists=false"; fi >> "$GITHUB_OUTPUT"