This commit is contained in:
Félix Malfait
2025-02-11 15:58:17 +01:00
committed by GitHub
parent 0307815e84
commit 05403ae247

View File

@ -21,13 +21,16 @@ jobs:
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
token: ${{ github.token }} token: ${{ github.token }}
ref: i18n ref: main
- name: Merge main into i18n - name: Setup i18n branch
run: | run: |
git fetch origin main if ! git ls-remote --heads origin i18n | grep i18n; then
git checkout i18n git checkout -b i18n
git merge origin/main else
git checkout i18n
git merge origin/main
fi
- name: Install dependencies - name: Install dependencies
uses: ./.github/workflows/actions/yarn-install uses: ./.github/workflows/actions/yarn-install
@ -49,12 +52,15 @@ jobs:
git add . git add .
if ! git diff --staged --quiet --exit-code; then if ! git diff --staged --quiet --exit-code; then
git commit -m "chore: extract translations" git commit -m "chore: extract translations"
git push origin HEAD:i18n
echo "changes_detected=true" >> $GITHUB_OUTPUT echo "changes_detected=true" >> $GITHUB_OUTPUT
else else
echo "changes_detected=false" >> $GITHUB_OUTPUT echo "changes_detected=false" >> $GITHUB_OUTPUT
fi fi
- name: Push changes and create remote branch if needed
if: steps.check_changes.outputs.changes_detected == 'true'
run: git push origin HEAD:i18n
- name: Upload missing translations - name: Upload missing translations
if: steps.check_changes.outputs.changes_detected == 'true' if: steps.check_changes.outputs.changes_detected == 'true'
uses: crowdin/github-action@v2 uses: crowdin/github-action@v2