We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 018d63c commit 1fe6678Copy full SHA for 1fe6678
.github/workflows/docs-build-push.yml
@@ -84,6 +84,16 @@ jobs:
84
- name: Output variables
85
run: |
86
echo forked_workflow: ${{ steps.vars.outputs.forked_workflow }}
87
+ - name: Check rate limit
88
+ run: |
89
+ RESPONSE=$(curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/rate_limit)
90
+ RATE_REMAINING=$(echo "$RESPONSE" | jq -r ".rate.remaining")
91
+ echo $RESPONSE
92
+ if [[ "$RATE_REMAINING" -le 0 ]]; then
93
+ echo "Rate limit for GitHub API has been exhausted. Failing build..."
94
+ exit 1
95
+ fi
96
+
97
build:
98
needs: [checks]
99
if: ${{ needs.checks.outputs.forked_workflow == 'false' }}
0 commit comments