fix(ci): commit newly added Crowdin translation files

The Crowdin sync workflow used `git diff --quiet` and `git commit -am`,
both of which only consider tracked files. New language files downloaded
by Crowdin (e.g. el-GR, th-TH) were therefore left untracked and silently
dropped on each run.

Switch the change check to `git status --porcelain` scoped to the
translation directories and stage them explicitly before committing so
new locales are included.
This commit is contained in:
Tink bot 2026-05-18 17:39:13 +00:00 committed by kolaente
parent dbccbd64ef
commit 52f3dd6806
1 changed files with 3 additions and 2 deletions

View File

@ -41,7 +41,7 @@ jobs:
- name: Check for changes
id: check_changes
run: |
if git diff --quiet; then
if [ -z "$(git status --porcelain pkg/i18n/lang frontend/src/i18n/lang)" ]; then
echo "changes_exist=0" >> "$GITHUB_OUTPUT"
else
echo "changes_exist=1" >> "$GITHUB_OUTPUT"
@ -51,7 +51,8 @@ jobs:
run: |
git config --local user.email "bot@vikunja.io"
git config --local user.name "Frederick [Bot]"
git commit -am "chore(i18n): update translations via Crowdin"
git add pkg/i18n/lang frontend/src/i18n/lang
git commit -m "chore(i18n): update translations via Crowdin"
- name: Push changes
if: steps.check_changes.outputs.changes_exist != '0'
uses: ad-m/github-push-action@master