Fix maintenance.sh: tools should use local apps repository #394
This file contains 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: Auto updates messages.pot for readme_generator | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
pybabel: | |
name: Auto updates messages.pot for readme_generator | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.11 | |
- name: Install dependencies | |
run: | | |
cd tools/readme_generator/ | |
pip install -r requirements.txt | |
- name: Save old messges.pot for diffing later | |
run: | | |
cd tools/readme_generator/ | |
cp messages.pot messages.pot.old | |
- name: Try to generate messages.pot | |
run: | | |
cd tools/readme_generator/ | |
pybabel extract --ignore-dirs venv -F babel.cfg -o messages.pot . | |
- name: Check if files changed | |
run: | | |
HAS_DIFF=$(python .github/diff_pot_files.py tools/readme_generator/messages.pot.old tools/readme_generator/messages.pot) | |
echo "HAS_DIFF=$HAS_DIFF" >> $GITHUB_ENV | |
- name: Create Pull Request | |
if: ${{ env.HAS_DIFF == 'true' }} | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
title: "Update messages.pot for readme_generator" | |
commit-message: "chore(readme_generator): update messages.pot" | |
body: | | |
This pull request has been generated using the command `pybabel extract --ignore-dirs venv -F babel.cfg -o messages.pot .` | |
base: ${{ github.head_ref }} # Creates pull request onto pull request or commit branch | |
branch: actions/auto_messages_pot |