Update Translation Statistics #17
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: Update Translation Statistics | |
| on: | |
| schedule: | |
| - cron: '0 0 * * 6' | |
| workflow_dispatch: | |
| jobs: | |
| update-stats: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v3 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.10' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r scripts/transifex/requirements.txt | |
| - name: Generate all stats | |
| run: python -m scripts.transifex.main generate-all-stats | |
| env: | |
| TRANSIFEX_API_TOKEN: ${{ secrets.TRANSIFEX_API_TOKEN }} | |
| - name: Commit and push if changes | |
| run: | | |
| git config --local user.email "action@github.com" | |
| git config --local user.name "GitHub Action" | |
| git add RESOURCE.md TEAM.md reports/ README.md | |
| git commit -m "Update translation statistics [skip ci]" || exit 0 | |
| git push |