Skip to content

Pull Translations from Transifex #13

Pull Translations from Transifex

Pull Translations from Transifex #13

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