Trigger clang-tidy restart via git commands (#1123)

This commit is contained in:
Alex Kremer
2024-01-16 16:44:35 +00:00
committed by GitHub
parent e3b6fc4bd4
commit 1fa09006f8
2 changed files with 16 additions and 10 deletions

View File

@@ -6,7 +6,6 @@ on:
branches: [master, release/*, develop]
workflow_dispatch:
jobs:
lint:
name: Check format
@@ -51,12 +50,12 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-depth: 0
- name: Prepare runner
uses: ./.github/actions/prepare_runner
with:
disable_ccache: false
disable_ccache: false
- name: Setup conan
uses: ./.github/actions/setup_conan
@@ -99,7 +98,7 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: clio_server_${{ runner.os }}_${{ matrix.build_type }}
path: build/clio_server
path: build/clio_server
- name: Upload clio_tests
if: ${{ !matrix.code_coverage }}
@@ -128,7 +127,6 @@ jobs:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
uses: ./.github/actions/code_coverage
test:
name: Run Tests
needs: build

View File

@@ -1,19 +1,27 @@
name: On clang-tidy auto fixes merged
name: Restart clang-tidy workflow
on:
pull_request:
types: [closed]
push:
branches: [develop]
workflow_dispatch:
jobs:
on_fix_merge:
if: ${{ github.event.pull_request.merged == true && contains(github.event.pull_request.title, '[CI] clang-tidy auto fixes') }}
restart_clang_tidy:
runs-on: ubuntu-20.04
permissions:
actions: write
steps:
- uses: actions/checkout@v4
- name: Get commit name
id: commit_name
shell: bash
run: |
commit=$(git log -1 --pretty=format:%s | grep '\[CI\] clang-tidy auto fixes')
echo "commit=$commit" >> $GITHUB_OUTPUT
- name: Run clang-tidy workflow
if: ${{ steps.commit_name.outputs.commit != '' }}
shell: bash
env:
GH_TOKEN: ${{ github.token }}