We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ce4d67d commit 3fcb818Copy full SHA for 3fcb818
.github/workflows/api-health.yml
@@ -14,14 +14,11 @@ jobs:
14
run: |
15
echo "Checking YTS API status..."
16
17
- RESPONSE=$(curl -s https://yts.mx/api/v2/list_movies.json)
18
-
19
- STATUS=$(echo "$RESPONSE" | jq -r '.status')
20
+ RESPONSE=$(curl -fsS https://yts.mx/api/v2/list_movies.json) || { echo "Curl failed"; exit 1; }
+ STATUS=$(echo "$RESPONSE" | jq -e -r '.status') || { echo "Invalid JSON"; echo "$RESPONSE"; exit 1; }
21
if [ "$STATUS" != "ok" ]; then
22
echo "❌ API status is NOT ok"
23
echo "$RESPONSE"
24
exit 1
25
fi
26
27
echo "✅ API status is OK"
0 commit comments