From 93919ab8b7f5fdb753c51873cc59518c23c30699 Mon Sep 17 00:00:00 2001 From: Ayaz Salikhov Date: Thu, 18 Sep 2025 14:55:59 +0100 Subject: [PATCH] ci: Move clang-tidy_on_fix_merged workflow into a main one (#2641) --- .github/workflows/clang-tidy.yml | 3 ++ .../workflows/clang-tidy_on_fix_merged.yml | 30 ------------------- 2 files changed, 3 insertions(+), 30 deletions(-) delete mode 100644 .github/workflows/clang-tidy_on_fix_merged.yml diff --git a/.github/workflows/clang-tidy.yml b/.github/workflows/clang-tidy.yml index a43f55f2..855b0a6d 100644 --- a/.github/workflows/clang-tidy.yml +++ b/.github/workflows/clang-tidy.yml @@ -1,6 +1,8 @@ name: Clang-tidy check on: + push: + branches: [develop] schedule: - cron: "0 9 * * 1-5" workflow_dispatch: @@ -22,6 +24,7 @@ env: jobs: clang_tidy: + if: github.event_name != 'push' || contains(github.event.head_commit.message, 'clang-tidy auto fixes') runs-on: heavy container: image: ghcr.io/xrplf/clio-ci:384e79cd32f5f6c0ab9be3a1122ead41c5a7e67d diff --git a/.github/workflows/clang-tidy_on_fix_merged.yml b/.github/workflows/clang-tidy_on_fix_merged.yml deleted file mode 100644 index fc0b37be..00000000 --- a/.github/workflows/clang-tidy_on_fix_merged.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Restart clang-tidy workflow - -on: - push: - branches: [develop] - workflow_dispatch: - -jobs: - restart_clang_tidy: - runs-on: ubuntu-latest - - permissions: - actions: write - - steps: - - uses: actions/checkout@v4 - - name: Check last commit matches clang-tidy auto fixes - id: check - shell: bash - run: | - passed=$(if [[ "$(git log -1 --pretty=format:%s | grep 'style: clang-tidy auto fixes')" ]]; then echo 'true' ; else echo 'false' ; fi) - echo "passed=\"$passed\"" >> $GITHUB_OUTPUT - - - name: Run clang-tidy workflow - if: ${{ contains(steps.check.outputs.passed, 'true') }} - shell: bash - env: - GH_TOKEN: ${{ github.token }} - GH_REPO: ${{ github.repository }} - run: gh workflow run clang-tidy.yml