File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 1414 env :
1515 PYGETTEXT_DOMAIN : ardupilot_methodic_configurator
1616 PYGETTEXT_LOCALEDIR : ardupilot_methodic_configurator/locale
17+ PO_FILES_CHANGED : false
1718
1819 steps :
1920 - uses : actions/checkout@v4
4849 if [ $CHANGED_LINES -gt 4 ]; then
4950 git commit -m "CHORE: Extracted i18n strings to $PYGETTEXT_LOCALEDIR/$PYGETTEXT_DOMAIN.pot"
5051 git push
52+
5153 python merge_pot_file.py
54+ # Check if any .po files were modified
55+ git add $PYGETTEXT_LOCALEDIR/**/$PYGETTEXT_DOMAIN.po
56+ PO_CHANGES=$(git status --porcelain | grep -E "\.po$" | wc -l)
57+ if [ $PO_CHANGES -gt 0 ]; then
58+ echo "PO_FILES_CHANGED=true" >> $GITHUB_ENV
59+ fi
5260 else
5361 echo "Not enough changes to commit (only $CHANGED_LINES lines changed)"
5462 fi
5765 fi
5866
5967 - name : Create Pull Request
68+ if : env.PO_FILES_CHANGED == 'true'
6069 uses : peter-evans/create-pull-request@v5
6170 with :
6271 token : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments