Skip to content

Update Translations #3347

Update Translations

Update Translations #3347

name: Update Translations
on:
workflow_dispatch:
push:
paths:
- '.github/workflows/update-translations.yml'
- 'scripts/update.sh'
schedule:
- cron: '0 4,16 * * *'
jobs:
update-translations:
runs-on: ubuntu-latest
if: github.repository == 'wpilibsuite/frc-docs-translations'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: 'true'
- name: Update Submodule
run: |
git submodule update --recursive --remote
- name: Install Transifex CLI
working-directory: /usr/local/bin
run: |
curl -o- https://raw.githubusercontent.com/transifex/cli/master/install.sh | bash -s -- v1.6.7
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
cache-dependency-path: 'requirements.txt'
- name: Update wheel
run: |
pip install wheel==0.34.2
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r ./requirements.txt
- name: Update Translations
run: |
bash -l scripts/update.sh
env:
TX_TOKEN: ${{ secrets.TX_TOKEN }}
- name: Lock Unused Transifex Resources
run: |
python scripts/lock-translations.py .tx/config
env:
TX_TOKEN: ${{ secrets.TX_TOKEN }}
- name: Create Commit & Push
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Update Translations from Transifex"
commit_user_name: GitHub
commit_user_email: [email protected]
commit_author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>