Update submodule #20
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: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
permissions: | |
contents: write | |
env: | |
LANGUAGE: pt_BR | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
persist-credentials: true | |
submodules: true | |
- name: Update submodule | |
run: | | |
git submodule update | |
cd peps && git fetch origin && git checkout main && git reset --hard origin | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
cache: 'pip' | |
cache-dependency-path: | | |
requirements.txt | |
peps/requirements.txt | |
- name: Install gettext | |
run: | | |
sudo apt update -y && sudo apt install gettext -y | |
- name: Install Python dependencies | |
run: | | |
python -m pip install -U pip | |
pip install -r requirements.txt -r peps/requirements.txt | |
- name: Patch peps/build.py to enable internationalization | |
run: | | |
git -C peps apply ../enable-i18n.diff | |
- name: Generate POT files | |
run: | | |
python peps/build.py --gettext | |
- name: Add/Update message catalog files | |
run: | | |
cd peps && sphinx-intl update -d ../locales -p build/gettext | |
- name: powrap | |
run: | | |
powrap --modified | |
- name: Commit and push changes | |
if: ${{ github.event_name == 'push' || | |
github.event_name == 'workflow_dispatch' }} | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: "Translation update" | |
file_pattern: .gitmodules locales/${{ env.LANGUAGE }}/LC_MESSAGES/*.po locales/${{ env.LANGUAGE }}/LC_MESSAGES/**/*.po | |
add_options: '-A' |