ci: reduce API polling interval from 5s to 20s

The CI-trigger workflow polls `gh run list` in a loop every 5 seconds
to find the CI-builds run ID. With 20+ concurrent CI workflows, this
generates ~480 API calls/minute, exhausting the GITHUB_TOKEN rate limit
(1,000 requests/hour) and causing HTTP 403 errors that block CI
execution entirely.

Increasing the polling interval to 20 seconds reduces API call rate by
4x (~120 calls/min across all workflows), keeping the repository well
under the rate limit while adding negligible delay to CI completion
(the builds themselves take 15-25 minutes).
ci-reduce-polling-interval
Rene Cannao 2 weeks ago
parent 77994a3692
commit 76434aca35

@ -23,7 +23,7 @@ jobs:
sleep 5
RUNID=$(gh -R ${{ github.repository }} run list -w CI-builds -s in_progress | grep -P "${RUNNAME1}|${RUNNAME2}|${RUNNAME3}" | grep -Po '(?<=workflow_run)\s+\d+')
while [[ -z ${RUNID} ]]; do
sleep 5
sleep 20
gh -R ${{ github.repository }} run list -w CI-builds -s in_progress | grep -P "${RUNNAME1}|${RUNNAME2}|${RUNNAME3}"
RUNID=$(gh -R ${{ github.repository }} run list -w CI-builds -s in_progress | grep -P "${RUNNAME1}|${RUNNAME2}|${RUNNAME3}" | grep -Po '(?<=workflow_run)\s+\d+')
done

Loading…
Cancel
Save