mirror of
https://github.com/XRPLF/clio.git
synced 2025-11-20 11:45:53 +00:00
ci: Move clang-tidy_on_fix_merged workflow into a main one (#2641)
This commit is contained in:
3
.github/workflows/clang-tidy.yml
vendored
3
.github/workflows/clang-tidy.yml
vendored
@@ -1,6 +1,8 @@
|
|||||||
name: Clang-tidy check
|
name: Clang-tidy check
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
push:
|
||||||
|
branches: [develop]
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "0 9 * * 1-5"
|
- cron: "0 9 * * 1-5"
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
@@ -22,6 +24,7 @@ env:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
clang_tidy:
|
clang_tidy:
|
||||||
|
if: github.event_name != 'push' || contains(github.event.head_commit.message, 'clang-tidy auto fixes')
|
||||||
runs-on: heavy
|
runs-on: heavy
|
||||||
container:
|
container:
|
||||||
image: ghcr.io/xrplf/clio-ci:384e79cd32f5f6c0ab9be3a1122ead41c5a7e67d
|
image: ghcr.io/xrplf/clio-ci:384e79cd32f5f6c0ab9be3a1122ead41c5a7e67d
|
||||||
|
|||||||
30
.github/workflows/clang-tidy_on_fix_merged.yml
vendored
30
.github/workflows/clang-tidy_on_fix_merged.yml
vendored
@@ -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
|
|
||||||
Reference in New Issue
Block a user