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