Remove unnecessary safety checks
GitHub doesn’t run workflows for commits pushed from inside of Actions
This commit is contained in:
parent
6a3bfc485e
commit
16f79268b2
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue