diff --git a/.github/workflows/pr-validation.yml b/.github/workflows/pr-validation.yml index 069db2859cc..d55b808676a 100644 --- a/.github/workflows/pr-validation.yml +++ b/.github/workflows/pr-validation.yml @@ -41,15 +41,19 @@ jobs: sha='${{ github.sha }}' fi - # Sometimes go get will fail initially, so we retry it up to 5 times before giving up + # Give GitHub some time to make the commit available + sleep 10 + + # Sometimes it can take https://proxy.golang.org up to a minute for the latest commit to be available. + # See the FAQ at https://proxy.golang.org/ FAILED=1 for i in {1..5}; do if go get "$repo/v2@$sha" ; then FAILED=0 break fi - echo "Failed to 'go get' $repo/v2@$sha, retrying in 10 seconds…" - sleep 10 + echo "Failed to 'go get' $repo/v2@$sha, retrying in 60 seconds…" + sleep 60 done exit $FAILED