CI: enforce result for files changed in PR

This commit is contained in:
Patrick Nicolas
2026-07-29 21:13:33 +02:00
parent d462ce4f27
commit 3ecb9d5069
2 changed files with 15 additions and 1 deletions
+6
View File
@@ -14,9 +14,15 @@ jobs:
pip install polib PyGithub
- name: Check that .po files are up to date
env:
GH_TOKEN: ${{ github.token }}
run: |
if [[ "${{github.ref}}" == 'refs/heads/master' ]] ; then
tools/check_po.py --manage-issues --github-repository "${{ github.repository }}" --github-token "${{ github.token }}"
elif [[ "${{github.base_ref}}" != "" ]] ; then
FILES=$(gh api repos/${{github.repository}}/pulls/${{github.event.pull_request.number}}/files | jq --raw-output '[.[].filename | select(. | startswith("locale/"))] | join(",")')
echo "Locale files changed by pull request: ${FILES}"
tools/check_po.py --fail-on "${FILES}"
else
tools/check_po.py
fi