Skip to content

Commit fcaceff

Browse files
Update transifex-pull.yml
1 parent 26342e1 commit fcaceff

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

‎.github/workflows/transifex-pull.yml‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,14 @@ jobs:
4545
git config --local user.email github-actions@github.com
4646
git config --local user.name "GitHub Action's update-translation job"
4747
48-
# 1. Restore your GitHub work *before* the check occurs
49-
- run: git checkout HEAD -- '**.po' || true
48+
# Only restore files that were actually modified locally on GitHub before the run
49+
- name: Protect uncommitted GitHub translations
50+
run: |
51+
git diff --name-only HEAD | while read file; do
52+
if [[ "$file" == *.po ]] && [ -f "$file" ]; then
53+
git checkout HEAD -- "$file"
54+
fi
55+
done || true
5056
5157
# 2. Filter files accurately based on what remains changed
5258
- name: Filter files

0 commit comments

Comments
 (0)