diff --git a/.github/actions/dispatch-suite/action.yaml b/.github/actions/dispatch-suite/action.yaml index cac384f..314ed96 100644 --- a/.github/actions/dispatch-suite/action.yaml +++ b/.github/actions/dispatch-suite/action.yaml @@ -28,6 +28,12 @@ inputs: description: 'Seconds between recovery polls' required: false default: '10' + watch-interval: + description: >- + Seconds between run-watch refresh polls. Defaults to 60 to stay well under + GitHub secondary rate limits when many suites are watched concurrently. + required: false + default: '60' runs: using: 'composite' @@ -50,6 +56,7 @@ runs: TARGET_REF: ${{ inputs.ref }} RECOVER_ATTEMPTS: ${{ inputs.recover-attempts }} RECOVER_INTERVAL: ${{ inputs.recover-interval }} + WATCH_INTERVAL: ${{ inputs.watch-interval }} run: | set -euo pipefail @@ -98,5 +105,7 @@ runs: } >> "$GITHUB_STEP_SUMMARY" # Block on the recovered run's conclusion. --exit-status makes gh return - # non-zero if the run concluded with a non-success result. - gh run watch "$RUN_ID" --repo "$TARGET_REPO" --exit-status + # non-zero if the run concluded with a non-success result. --interval + # keeps the refresh cadence well under GitHub secondary rate limits when + # many suites are watched at once (the default 3s cadence over-polled). + gh run watch "$RUN_ID" --repo "$TARGET_REPO" --exit-status --interval "$WATCH_INTERVAL"