Skip to content

Commit

Permalink
Use longer timeframe
Browse files Browse the repository at this point in the history
  • Loading branch information
theunrepentantgeek committed Oct 5, 2023
1 parent 64714e3 commit 14bdbf8
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/pr-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 14bdbf8

Please sign in to comment.