From 54de74d44cc6d1d73d93a2afcfa8f31e8eac1bca Mon Sep 17 00:00:00 2001 From: hailt Date: Thu, 12 Nov 2026 21:57:25 +0700 Subject: [PATCH] fix: make backend healthcheck zsh-safe --- .github/workflows/cd.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 03a02b9..cc27caa 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -81,11 +81,11 @@ jobs: ssh prod ' set -euo pipefail for i in $(seq 1 30); do - status=$(docker inspect -f "{{.State.Health.Status}}" danangble-be 2>/dev/null || true) - [ "$status" = healthy ] && exit 0 - [ "$status" = unhealthy ] && docker logs --tail 80 danangble-be && exit 1 + health_status=$(docker inspect -f "{{.State.Health.Status}}" danagble-be 2>/dev/null || true) + [ "$health_status" = healthy ] && exit 0 + [ "$health_status" = unhealthy ] && docker logs --tail 80 danagble-be && exit 1 sleep 2 done - docker logs --tail 80 danangble-be + docker logs --tail 80 danagble-be exit 1 '