diff --git a/.github/workflows/wait-and-upload.yml b/.github/workflows/wait-and-upload.yml index e2fd6dd1..8821aaaa 100644 --- a/.github/workflows/wait-and-upload.yml +++ b/.github/workflows/wait-and-upload.yml @@ -38,6 +38,8 @@ jobs: steps: - name: Get specific check run status run: | + # start with a random sleep to prevent hitting the api too hard. + sleep $(($RANDOM % 180)) while [[ true ]]; do # For GitHub Apps # conclusion=$(gh api repos/$GITHUB_REPOSITORY/commits/$GITHUB_SHA/status --jq '.check_runs[] | select(.name == "ci/hydra-build:$DEV_SHELL") | .conclusion') @@ -54,7 +56,7 @@ jobs: *) echo "conclusion is: '$conclusion'" gh api repos/$GITHUB_REPOSITORY/commits/$GITHUB_SHA/status --paginate --jq '.' - WAIT=$((180 + $RANDOM % 60)) + WAIT=$((180 + $RANDOM % 180)) echo "ci/hydra-build:$DEV_SHELL pending. Waiting ${WAIT}s..." sleep $WAIT;; esac