fix: prevent docker inspect SSH exit from aborting health check loop

This commit is contained in:
NetworkCats
2026-03-08 00:36:18 +08:00
parent 0b90e5b3cd
commit 9ff0649c02
+1 -1
View File
@@ -141,7 +141,7 @@ jobs:
echo "Active deployment color: ${DEPLOY_COLOR}"
for i in $(seq 1 30); do
status=$(ssh $SSH_OPTS "$VPS_HOST" \
"docker inspect --format='{{ '{{' }}.State.Health.Status{{ '}}' }}' rustyip-app-${DEPLOY_COLOR}" 2>/dev/null)
"docker inspect --format='{{ '{{' }}.State.Health.Status{{ '}}' }}' rustyip-app-${DEPLOY_COLOR}" 2>/dev/null) || true
if [ "$status" = "healthy" ]; then
echo "Deployment verified: app-${DEPLOY_COLOR} is healthy"
exit 0