From 9208fec2cc1e9df27ebf4cdefcfd6e333c344520 Mon Sep 17 00:00:00 2001 From: prince-deriv <82309725+prince-deriv@users.noreply.github.com> Date: Fri, 10 Nov 2023 12:09:16 +0400 Subject: [PATCH] Update translation-sync.yml (#5888) --- .github/workflows/translation-sync.yml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/translation-sync.yml b/.github/workflows/translation-sync.yml index de4f273257e..632ca935baa 100644 --- a/.github/workflows/translation-sync.yml +++ b/.github/workflows/translation-sync.yml @@ -32,28 +32,29 @@ jobs: - run: npm i -g @crowdin/cli@3.7.8 - name: Fetch,Sync & Push Strings to Crowdin run: | + + branch_name="new_translation_strings" + + echo "Setting up Git identity" + git config --global user.name "DerivFE" + git config --global user.email "80095553+DerivFE@users.noreply.github.com" + + echo "Checking out new branch [$branch_name]" + git checkout -b "$branch_name" + # Download new translated strings echo 'Fetch Crowdin Master Translation ⬇️' crowdin download -b master -T ${{ secrets.CROWDIN_API_KEY }} && crowdin download -b master -l zh-CN -T ${{ secrets.CROWDIN_API_KEY }} - if [ -n "$(git status --porcelain)" ]; then # New strings are added, create a PR to update the master - branch_name="new_translation_strings" - - echo "Setting up Git identity" - git config --global user.name "DerivFE" - git config --global user.email "80095553+DerivFE@users.noreply.github.com" - # Commit the newly downloaded files cd $(git rev-parse --show-toplevel) echo "GIT STATUS: $(git status --porcelain)" git add . - echo "Checking out new branch [$branch_name]" - git checkout -b "$branch_name" - + # Force push to this branch in case a previous run created it. git push --set-upstream origin "$branch_name" -f