Merge pull request #953 from bnugent/fix/migration-transaction #211
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 Translations and Wiki Status | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'cps/**' | |
| - 'scripts/compile_translations.sh' | |
| - 'scripts/update_translations.sh' | |
| - 'scripts/generate_translation_status.py' | |
| - '.github/workflows/update-translations.yml' | |
| workflow_dispatch: | |
| jobs: | |
| update-translations: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.13' | |
| - name: Install dependencies | |
| run: pip install Babel polib jinja2 | |
| - name: Install gettext | |
| run: sudo apt-get update && sudo apt-get install -y gettext | |
| - name: Run update_translations.sh | |
| run: bash scripts/update_translations.sh | |
| - name: Clone wiki repo | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GH_PAT }} | |
| run: | | |
| git clone https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}.wiki.git wiki-tmp | |
| - name: Generate translation status table (in wiki repo) | |
| run: | | |
| python scripts/generate_translation_status.py wiki-tmp/Contributing-Translations.md | |
| - name: Commit and push wiki update | |
| run: | | |
| cd wiki-tmp | |
| git config --global user.name "github-actions[bot]" | |
| git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add Contributing-Translations.md | |
| git commit -m "Update translation status table [skip ci]" || echo "No changes to commit" | |
| git push |