Prevent infinite workflow loops by skipping CI bot commits

- Add condition to skip workflow when triggered by Auto-sort commits
- Use github.event.head_commit.message to detect CI bot commits
- Prevent infinite loop where workflow push triggers another workflow run
- Only run workflow for user commits, not automated CI commits
- Maintains functionality while preventing recursive execution
This commit is contained in:
2025-08-11 11:52:04 +07:00
parent b8fd333f04
commit e8c01c8747

View File

@@ -12,6 +12,8 @@ on:
jobs:
auto-sort:
runs-on: ubuntu-latest
# Skip if the commit was made by the CI bot to prevent infinite loops
if: ${{ !contains(github.event.head_commit.message, 'Auto-sort:') }}
steps:
- name: Checkout repository