Skip to content

Commit

Permalink
change livhecke workflow script to not exit due to -e flag when need …
Browse files Browse the repository at this point in the history
…to retry
  • Loading branch information
toy committed Jul 7, 2024
1 parent cf1156d commit e0623af
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/livecheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@ jobs:
MAX_ATTEMPTS=10
for ((attempt = 1; ; attempt++)); do
echo "#### Attempt $attempt"
bundle exec script/livecheck
exit_code=$?
if [ $exit_code -eq 2 ] && [ $attempt -lt $MAX_ATTEMPTS ]; then
sleep 300
if bundle exec script/livecheck; then
exit
else
exit $exit_code
exit_code=$?
if [ $exit_code -eq 2 ] && [ $attempt -lt $MAX_ATTEMPTS ]; then
sleep 3
else
exit $exit_code
fi
fi
done

0 comments on commit e0623af

Please sign in to comment.