Skip to content

The open alternative to Salesforce, designed for AI.

i18n CI 7 (#10321)

Félix Malfait248ec4cd6f99
diff --git a/.github/workflows/i18n-pull.yaml b/.github/workflows/i18n-pull.yaml
index b94261ca799..13d8d2ecce6 100644
--- a/.github/workflows/i18n-pull.yaml
+++ b/.github/workflows/i18n-pull.yaml
@@ -94,6 +94,7 @@ jobs:
- name: Commit Translations
run: |
+ git config --global --add safe.directory "$GITHUB_WORKSPACE"
git config --global user.name 'github-actions'
git config --global user.email '[email protected]'
git add .
@@ -125,6 +126,11 @@ jobs:
- name: Create pull request
if: steps.check_changes.outputs.changes_detected == 'true'
- run: gh pr create -B main -H i18n --title 'i18n - translations' --body 'Created by Github action' || true
+ run: |
+ if git diff --name-only origin/main..HEAD | grep -q .; then
+ gh pr create -B main -H i18n --title 'i18n - translations' --body 'Created by Github action' || true
+ else
+ echo "No file differences between branches, skipping PR creation"
+ fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/i18n-push.yaml b/.github/workflows/i18n-push.yaml
index b65438f4bac..d21e823ccdb 100644
--- a/.github/workflows/i18n-push.yaml
+++ b/.github/workflows/i18n-push.yaml
@@ -91,9 +91,13 @@ jobs:
# Visit https://crowdin.com/settings#api-key to create this token
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
-
- name: Create a pull request
if: steps.check_extract_changes.outputs.changes_detected == 'true' || steps.check_compile_changes.outputs.changes_detected == 'true'
- run: gh pr create -B main -H i18n --title 'i18n - translations' --body 'Created by Github action' || true
+ run: |
+ if git diff --name-only origin/main..HEAD | grep -q .; then
+ gh pr create -B main -H i18n --title 'i18n - translations' --body 'Created by Github action' || true
+ else
+ echo "No file differences between branches, skipping PR creation"
+ fi
env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}