mirror of
https://github.com/Magnus167/rustframe.git
synced 2025-08-20 13:00:00 +00:00
Add error handling for fetching runners in runner-fallback action
This commit is contained in:
parent
5cca2ca149
commit
ac4d67146e
7
.github/actions/runner-fallback/action.yml
vendored
7
.github/actions/runner-fallback/action.yml
vendored
@ -40,6 +40,13 @@ runs:
|
|||||||
runners=$(curl -s -H "Authorization: Bearer $TOKEN" \
|
runners=$(curl -s -H "Authorization: Bearer $TOKEN" \
|
||||||
-H "Accept: application/vnd.github+json" \
|
-H "Accept: application/vnd.github+json" \
|
||||||
"https://api.github.com/repos/$repo/actions/runners?per_page=100")
|
"https://api.github.com/repos/$repo/actions/runners?per_page=100")
|
||||||
|
|
||||||
|
# Check if runners is null or empty
|
||||||
|
if [ -z "$runners" ] || [ "$runners" = "null" ]; then
|
||||||
|
echo "❌ Error: Unable to fetch runners or no runners found." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# Split wanted labels
|
# Split wanted labels
|
||||||
IFS=',' read -ra WANT <<<"$PRIMARY"
|
IFS=',' read -ra WANT <<<"$PRIMARY"
|
||||||
online_found=0
|
online_found=0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user