Revert "Be more radical around %"

This reverts commit 92618ffaa9.
This commit is contained in:
Igor
2023-04-23 11:43:32 +02:00
parent 92618ffaa9
commit 0833affefa

View File

@@ -200,12 +200,12 @@ jobs:
API_CALLS_LEFT=$(curl -s -H "Accept: application/vnd.github.v3+json" -H "Authorization: token ${{ secrets.ACCESS_TOKEN }}" https://api.github.com/rate_limit | jq -r '.rate.remaining')
PERCENT=$(( API_CALLS_LEFT * 100 / API_CALLS_TOTAL ))
if [[ $PERCENT =~ ^[0-9]+$ ]]; then
if [[ $PERCENT -gt 30 ]]; then
if [[ $PERCENT -gt 50 ]]; then
echo "API rate in good shape $PERCENT % free"
exit 0
fi
fi
echo "API rate lower then 30%, sleping 5m"
echo "API rate lower then 50%, sleping 5m"
sleep 5m
done