From ebdbb5fc208e8786707ee8d35fb0a8d1be9f36f9 Mon Sep 17 00:00:00 2001 From: miro Date: Wed, 15 May 2024 03:23:00 +0100 Subject: [PATCH] automations/translations --- .github/workflows/publish_alpha.yml | 1 + .github/workflows/sync_tx.yml | 32 +++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 .github/workflows/sync_tx.yml diff --git a/.github/workflows/publish_alpha.yml b/.github/workflows/publish_alpha.yml index 1b2ec56..1cd4443 100644 --- a/.github/workflows/publish_alpha.yml +++ b/.github/workflows/publish_alpha.yml @@ -16,6 +16,7 @@ on: - 'MANIFEST.in' - 'readme.md' - 'scripts/**' + - 'translations/**' workflow_dispatch: jobs: diff --git a/.github/workflows/sync_tx.yml b/.github/workflows/sync_tx.yml new file mode 100644 index 0000000..2fd378e --- /dev/null +++ b/.github/workflows/sync_tx.yml @@ -0,0 +1,32 @@ +name: Run script on merge to dev by gitlocalize-app + +on: + workflow_dispatch: + push: + branches: + - dev + +jobs: + run-script: + runs-on: ubuntu-latest + steps: + - name: Check out repository + uses: actions/checkout@v2 + with: + ref: dev + fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository. + - name: Setup Python + uses: actions/setup-python@v1 + with: + python-version: 3.9 + + - name: Run script if merged by gitlocalize-app[bot] + if: github.event_name == 'push' && github.event.head_commit.author.username == 'gitlocalize-app[bot]' + run: | + python scripts/sync_translations.py + + - name: Commit to dev + uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: Update translations + branch: dev