Pull Translations from Transifex #13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Pull Translations | |
| on: | |
| schedule: | |
| - cron: '0 */6 * * *' | |
| workflow_dispatch: | |
| jobs: | |
| pull: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Install Transifex client | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install transifex-client | |
| - name: Configure Transifex authentication | |
| run: | | |
| echo "[https://www.transifex.com]" > ~/.transifexrc | |
| echo "api_hostname = https://api.transifex.com" >> ~/.transifexrc | |
| echo "hostname = https://www.transifex.com" >> ~/.transifexrc | |
| echo "username = api" >> ~/.transifexrc | |
| echo "password = $TX_TOKEN" >> ~/.transifexrc | |
| env: | |
| TX_TOKEN: ${{ secrets.TX_TOKEN }} | |
| - name: Pull translations from Transifex | |
| run: | | |
| tx pull --all --force | |
| - name: Commit and push changes | |
| run: | | |
| git config user.name "github-actions" | |
| git config user.email "actions@github.com" | |
| git add . | |
| git commit -m "Auto pull translations" || echo "No changes" | |
| git push |