File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
{{cookiecutter.project_slug}}/.github/workflows Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 2020 runs-on : ubuntu-latest
2121 if : ${{ github.event.pull_request.user.login == 'dependabot[bot]' }}
2222 steps :
23+ - name : Check rate limit
24+ id : rate-limit
25+ shell : bash
26+ run : |
27+ RATE_LIMIT=$(gh api /rate_limit | jq -r '.resources.core.remaining')
28+ echo "::set-output name=remaining::$RATE_LIMIT"
29+ if [[ "$RATE_LIMIT" -lt 10 ]]; then
30+ RESET_TIME=$(gh api /rate_limit | jq -r '.resources.core.reset')
31+ echo "::set-output name=reset_time::$RESET_TIME"
32+ echo "Rate limit is low ($RATE_LIMIT). Waiting until $RESET_TIME"
33+ sleep $((RESET_TIME - $(date +%s)))
34+ fi
2335 - name : Dependabot metadata
2436 id : dependabot-metadata
2537 uses : dependabot/fetch-metadata@v1.3.1
You can’t perform that action at this time.
0 commit comments