From e076c3be19944744ca82d019aaa367a73371e808 Mon Sep 17 00:00:00 2001 From: Wang Zhuoxuan Date: Sat, 18 Apr 2026 03:11:35 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20CI=20health=20check=20=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=20bun=20fetch=20=E6=9B=BF=E4=BB=A3=20curl?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit runner 镜像 duoqi-runner:bun-git 未安装 curl, 改用 bun 内置 fetch API 做 HTTP 健康检查。 --- .gitea/workflows/deploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index ecbe4f9..36f07e4 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -69,7 +69,7 @@ jobs: run: | sleep 10 for i in {1..5}; do - if curl -f http://localhost:3001/health; then + if bun -e "fetch('http://localhost:3001/health').then(r=>r.ok?process.exit(0):process.exit(1)).catch(()=>process.exit(1))"; then echo "Test environment is healthy!" exit 0 fi @@ -107,7 +107,7 @@ jobs: run: | sleep 15 for i in {1..5}; do - if curl -f http://localhost:3000/health; then + if bun -e "fetch('http://localhost:3000/health').then(r=>r.ok?process.exit(0):process.exit(1)).catch(()=>process.exit(1))"; then echo "Production deployment successful!" exit 0 fi