aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/translation.yml
blob: 625d28edf3d6945baef24ce97ef613e4cc7846c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
name: Update Translations

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v3
    - uses: actions/setup-python@v4
      with:
        python-version: '3.x'
    - run: pip install transifex-python
    - name: Update translations
      env:
        TRANSIFEX_TOKEN: ${{ secrets.TRANSIFEX_TOKEN }}
      run: ./tools/translate.sh -t "$TRANSIFEX_TOKEN"
    - name: Commit changes
      run: |
        git config --global user.name 'Traccar Bot'
        git config --global user.email 'support@traccar.org'
        git commit -am "Update localization files"
        git remote set-url origin "https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}"
        git push