From ff6c50664389095457e8643475c70b880f819c0f Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 16 Jul 2022 09:37:48 -0700 Subject: Action for translation --- .github/workflows/translation.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/translation.yml (limited to '.github') diff --git a/.github/workflows/translation.yml b/.github/workflows/translation.yml new file mode 100644 index 00000000..cd4afb49 --- /dev/null +++ b/.github/workflows/translation.yml @@ -0,0 +1,30 @@ +name: Update Translations + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +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 -- cgit v1.2.3