From 56505c1c2ed11835db860fe2b309696ee990bfe9 Mon Sep 17 00:00:00 2001 From: prince-deriv <82309725+prince-deriv@users.noreply.github.com> Date: Thu, 14 Dec 2023 09:26:26 +0400 Subject: [PATCH] Update translation-sync.yml --- .github/workflows/translation-sync.yml | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/.github/workflows/translation-sync.yml b/.github/workflows/translation-sync.yml index f0503ec6ebc..ba1122af4e7 100644 --- a/.github/workflows/translation-sync.yml +++ b/.github/workflows/translation-sync.yml @@ -60,12 +60,25 @@ jobs: sudo apt install gh gh auth login --with-token <<< ${{ github.token }} - pr_close=$(gh pr close "$branch_name" || true) + gh pr close "$branch_name" || true + + # Check the exit status + EXIT_STATUS=$? + + # Set the output variable based on the exit status + if [ $EXIT_STATUS -eq 0 ]; then + al="false" + echo "ALERT=false" >> $GITHUB_ENV + else + al="true" + echo "ALERT=true" >> $GITHUB_ENV + fi + pr_output=$(gh pr create --base "master" --title "[translations] New strings from crowdin 📚" --head "binary-com:$branch_name" -F ".github/translation_sync_template.md") echo "PR_URL=$pr_output" >> $GITHUB_ENV - echo "PR_CLOSE=$pr_close" >> $GITHUB_ENV - echo $pr_close - echo $pr_output + + echo "Should alert: $al" + fi # Upload new strings to Crowdin