From c898b47a72f986d7afdb6b7c86d224403f054ec1 Mon Sep 17 00:00:00 2001 From: Jeffery Date: Thu, 26 Mar 2026 14:51:27 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=B0=87=E5=8F=83=E6=95=B8=E8=BC=B8?= =?UTF-8?q?=E5=87=BA=E7=A7=BB=E5=88=B0=E6=9C=80=E5=BE=8C=E4=B8=80=E5=80=8B?= =?UTF-8?q?=E6=AD=A5=E9=A9=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- action.yaml | 3 +++ entrypoint.sh | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/action.yaml b/action.yaml index 2e474a0..a9b146c 100644 --- a/action.yaml +++ b/action.yaml @@ -8,6 +8,9 @@ inputs: HEALTH_CODE: description: '健康碼' default: '200' +outputs: + status_code: + description: '服務的狀態碼' runs: using: 'docker' image: 'Dockerfile' diff --git a/entrypoint.sh b/entrypoint.sh index c202eec..521a270 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -31,10 +31,10 @@ while true; do sleep 60 done -# 將狀態碼輸出到環境變數 -echo "status_code=$STATUS_CODE" >> "$GITHUB_OUTPUT" - # 檢查狀態碼是否正確 [ "$STATUS_CODE" = "$HEALTH_CODE" ] && exit 0 || exit 1 -echo "==================================================" \ No newline at end of file +echo "==================================================" + +# 將狀態碼輸出到環境變數 +echo "status_code=$STATUS_CODE" >> "$GITHUB_OUTPUT" \ No newline at end of file