diff --git a/.github/workflows/check-api-status.yml b/.github/workflows/check-api-status.yml index e6b8f4a..9fa1cd6 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" ] && [ "$response" != "301" ]; then - echo "HTTP状态码不等于200且不等于301,发送通知..." + if [ "$response" != "200" ] && [ "$response" != "301" && [ "$response" != "302" ]; then + echo "HTTP状态码不等于200且不等于301/302,发送通知..." curl -X POST \ -H 'Content-Type: application/json' \ -d '{