From e0623afcfc1d40bdd1c08887d02f486894d94761 Mon Sep 17 00:00:00 2001 From: Ivan Kuchin Date: Sun, 7 Jul 2024 15:07:44 +0200 Subject: [PATCH] change livhecke workflow script to not exit due to -e flag when need to retry --- .github/workflows/livecheck.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/livecheck.yml b/.github/workflows/livecheck.yml index 6338748..705bfcd 100644 --- a/.github/workflows/livecheck.yml +++ b/.github/workflows/livecheck.yml @@ -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