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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user