Update Translation Metrics #45
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 Metrics | |
| on: | |
| schedule: | |
| - cron: '0 3 * * *' | |
| workflow_dispatch: | |
| jobs: | |
| generate-metrics: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.x" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install requests | |
| - name: Generate translation metrics | |
| run: python scripts/generate_translation_metrics.py | |
| - name: Commit and push metrics | |
| run: | | |
| git config user.name "Planify Bot" | |
| git config user.email "[email protected]" | |
| git add data/translations_metrics.json | |
| git diff --staged --quiet || git commit -m "Update translation metrics" | |
| git pull --rebase origin master || true | |
| git push origin master |