From e8c01c8747455182d76c492d85894c944c4d6bc4 Mon Sep 17 00:00:00 2001 From: grabowski Date: Mon, 11 Aug 2025 11:52:04 +0700 Subject: [PATCH] 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 --- .gitea/workflows/auto-sort-files.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitea/workflows/auto-sort-files.yml b/.gitea/workflows/auto-sort-files.yml index bd11fc7..9d495bd 100644 --- a/.gitea/workflows/auto-sort-files.yml +++ b/.gitea/workflows/auto-sort-files.yml @@ -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