Remove unnecessary safety checks

GitHub doesn’t run workflows for commits pushed from inside of Actions
This commit is contained in:
Jed Fox 2023-01-03 08:50:17 -05:00
parent 6a3bfc485e
commit 16f79268b2
No known key found for this signature in database
GPG Key ID: 0B61D18EA54B47E1
1 changed files with 0 additions and 19 deletions

View File

@ -23,26 +23,7 @@ jobs:
run: exec ./.github/scripts/setup.sh
- name: Update localization files
run: exec ./update_localization.sh
- name: Check for changes
id: changes
run: |
git status --porcelain
if git diff --quiet; then
echo "No changes to commit. Skipping push."
echo "changes=false" >> $GITHUB_OUTPUT
else
echo "changes=true" >> $GITHUB_OUTPUT
fi
- name: Avoid infinite loops
if: steps.changes.outputs.changes == 'true'
run: |
if git log -1 --pretty=%B | grep -q "Auto-update generated files"; then
echo "This commit was generated by the localization workflow. Exiting."
echo "::error::Localization files changed again after auto-update, failing now to avoid infinite loop."
exit 1
fi
- name: Commit and push changes
if: steps.changes.outputs.changes == 'true'
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "Auto-update generated files"