From 7f1c55e4fcbc7d2d5d7fca5256296f39839cd10d Mon Sep 17 00:00:00 2001 From: Furior Date: Sat, 21 Oct 2023 22:47:54 +0700 Subject: [PATCH] branch update --- .github/workflows/auto_translate.yml | 4 ++- .github/workflows/translate_branch_update.yml | 35 +++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/translate_branch_update.yml diff --git a/.github/workflows/auto_translate.yml b/.github/workflows/auto_translate.yml index 15703f72770b..5db8fe9c0132 100644 --- a/.github/workflows/auto_translate.yml +++ b/.github/workflows/auto_translate.yml @@ -51,5 +51,7 @@ jobs: - name: 'Push Translation' run: | + git config --local user.email "action@github.com" + git config --local user.name "SS220Manager" git commit -m "Generate translation file" - git push -u -f origin/translate + git push -u -f origin translate diff --git a/.github/workflows/translate_branch_update.yml b/.github/workflows/translate_branch_update.yml new file mode 100644 index 000000000000..6ceaa45ac0d5 --- /dev/null +++ b/.github/workflows/translate_branch_update.yml @@ -0,0 +1,35 @@ +name: Update translate branch + +on: + workflow_dispatch: + push: + branches: ['master'] + +jobs: + add_translation: + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + + steps: + - name: 'Update Branch' + uses: actions/checkout@v4 + + - name: Create temporary branch + run: | + git branch -f translate_tmp + git checkout translate_tmp + git reset --hard origin/master + + - name: Apply existing translation + run: | + git checkout origin/translate -- ./tools/translator/ss220replace.json + ./tools/translator/ss220_replacer_linux --prefix=ss220 --root=./../../ --location=./ + + - name: 'Push Translation' + run: | + git config --local user.email "action@github.com" + git config --local user.name "SS220Manager" + git commit -m "Generate translation file" + git push -u -f origin translate