Update crowdin/github-action action to v2.16.0 (#467) #396
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-l10n | |
| on: | |
| push: | |
| branches: [master] | |
| jobs: | |
| update-l10n: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout ποΈ | |
| uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Setup Python π | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.13" | |
| - name: Restore pip cache πΎ | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pip- | |
| - name: Install Babel π | |
| run: | | |
| pip3 install -U pip | |
| pip3 install Babel==2.9.0 | |
| - name: Update localization source file π | |
| run: | | |
| pybabel extract bot.py pdf_bot/ -o locale/pdf_bot.pot | |
| pybabel update -l locale -i locale/pdf_bot.pot -o locale/en_GB/LC_MESSAGES/pdf_bot.po | |
| echo NUM_DIFFS=$(git diff --shortstat | egrep -o '[0-9]+ i' | egrep -o '[0-9]+') >> $GITHUB_ENV | |
| - name: Create Pull Request π | |
| if: env.NUM_DIFFS > 1 | |
| uses: peter-evans/create-pull-request@v8 | |
| with: | |
| commit-message: Update localization source file | |
| branch: update/l10n-source-file | |
| title: Update localization source file |