-
Notifications
You must be signed in to change notification settings - Fork 24
37 lines (32 loc) · 1.05 KB
/
sync_tx.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Run script on merge to dev by gitlocalize-app
on:
workflow_dispatch:
push:
branches:
- main
jobs:
run-script:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
with:
ref: main
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Run script if manual dispatch
if: github.event_name == 'workflow_dispatch'
run: |
python scripts/sync_translations.py
- 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 main
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Update translations
branch: main