From 02b002fa9fcd1f6ef2a07abd4a363f1599f5c8f0 Mon Sep 17 00:00:00 2001 From: Paillat Date: Sat, 3 May 2025 17:22:53 +0200 Subject: [PATCH] Refactor exit code handling in update script for consistency and clarity --- .github/workflows/build.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 6f37261..cad6979 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -61,11 +61,11 @@ jobs: id: run_script run: | uv run src - EXIT_CODE=$? - if [ $EXIT_CODE -eq 0 ]; then + CODE=$? + if [ $CODE -eq 0 ]; then echo "Changes detected" echo "changes_detected=true" >> $GITHUB_ENV - elif [ $EXIT_CODE -eq 3 ]; then + elif [ $CODE -eq 3 ]; then echo "No changes detected" echo "changes_detected=false" >> $GITHUB_ENV # Transform it to 0 to avoid failing the workflow @@ -74,7 +74,7 @@ jobs: else echo "Script failed with exit code $EXIT_CODE" echo "exit_code=$EXIT_CODE" >> $GITHUB_ENV - exit $EXIT_CODE + exit $CODE fi - name: Commit and Push Changes