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 14
14
env :
15
15
PYGETTEXT_DOMAIN : ardupilot_methodic_configurator
16
16
PYGETTEXT_LOCALEDIR : ardupilot_methodic_configurator/locale
17
+ PO_FILES_CHANGED : false
17
18
18
19
steps :
19
20
- uses : actions/checkout@v4
48
49
if [ $CHANGED_LINES -gt 4 ]; then
49
50
git commit -m "CHORE: Extracted i18n strings to $PYGETTEXT_LOCALEDIR/$PYGETTEXT_DOMAIN.pot"
50
51
git push
52
+
51
53
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
52
60
else
53
61
echo "Not enough changes to commit (only $CHANGED_LINES lines changed)"
54
62
fi
57
65
fi
58
66
59
67
- name : Create Pull Request
68
+ if : env.PO_FILES_CHANGED == 'true'
60
69
uses : peter-evans/create-pull-request@v5
61
70
with :
62
71
token : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments