-
Notifications
You must be signed in to change notification settings - Fork 292
46 lines (40 loc) · 1.38 KB
/
pull_translations.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
38
39
40
41
42
43
44
45
46
name: Pull Translations from Transifex
on:
schedule:
- cron: '0 0 1 * *'
workflow_dispatch:
jobs:
pull-translations:
name: Pull Translations from Transifex
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Pull Translations from Transifex
run: |
curl -o transifex.sh https://raw.githubusercontent.com/Bahmni/bahmni-infra-utils/main/transifex.sh
chmod +x transifex.sh
./transifex.sh pull
rm transifex.sh
env:
TX_TOKEN: ${{ secrets.TX_TOKEN }}
- name: Commit and push changes
id: auto-commit-action
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "[Bahmni Infra] | Add. Update Translation Resources"
branch: ${{ github.ref }}
file_pattern: 'ui/app/i18n/**/*.json'
repository: .
commit_user_name: Bahmni Infra
commit_user_email: [email protected]
commit_author: bahmni-infra <[email protected]>
- name: Check for changes
run: |
if [[ steps.auto-commit-action.outputs.changes_detected == 'true' ]]; then
echo "Changes Detected. Translation Resources Updated."
else
echo "No Changes Detected. Project Already Up-To-Date."
fi