-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (30 loc) · 1.17 KB
/
transifex_merge.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
# Since transifex-synchronization-source is just a staging branch to control
# updates to Transifex, we need to force merge the translations to master,
# excluding the English source files
name: Translations merge to master
on:
pull_request:
types: [closed]
branches:
- transifex-synchronization-source
jobs:
merge-translations:
if: github.event.pull_request.user.login == 'transifex-integration[bot]' && github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: Checkout master branch
uses: actions/checkout@v4
with:
ref: master
- name: Force merge translation directories (excluding English)
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
for dir in language/*/; do
if [ -d $dir ] && [ "$(basename $dir)" != "en" ]; then
git checkout transifex-synchronization-source -- $dir
git add $dir
fi
done
git commit -m "[Transifex] Update translations on master"
git push origin master --force