From a29de76d8db3f755c275312364dd6097d58055de Mon Sep 17 00:00:00 2001 From: leo-songye-li Date: Sat, 16 Nov 2024 14:10:26 +0800 Subject: [PATCH] Update check-api-status.yml --- .github/workflows/check-api-status.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-api-status.yml b/.github/workflows/check-api-status.yml index 8d18c0c..e6b8f4a 100644 --- a/.github/workflows/check-api-status.yml +++ b/.github/workflows/check-api-status.yml @@ -20,8 +20,8 @@ jobs: for api in "${apis[@]}"; do echo "Accessing API with element $api" response=$(curl -o /dev/null -s -w "%{http_code}\n" "$api") - if [ "$response" != "200" ]; then - echo "HTTP状态码不等于200,发送通知..." + if [ "$response" != "200" ] && [ "$response" != "301" ]; then + echo "HTTP状态码不等于200且不等于301,发送通知..." curl -X POST \ -H 'Content-Type: application/json' \ -d '{