Add attempt at auto rerun functionality (#1105)

Attempting to refactor clang-tidy as an action and reuse it from two workflows.
This commit is contained in:
Alex Kremer
2024-01-15 19:48:59 +00:00
committed by GitHub
parent 13d2d4e2ca
commit eeaccbabd9
3 changed files with 29 additions and 13 deletions

View File

@@ -21,9 +21,13 @@ runs:
retention-days: 30
- name: Upload coverage report
uses: codecov/codecov-action@v3
uses: wandalen/wretry.action@v1.3.0
with:
action: codecov/codecov-action@v3
with: |
files: build/coverage_report.xml
fail_ci_if_error: true
verbose: true
token: ${{ env.CODECOV_TOKEN }}
attempt_limit: 5
attempt_delay: 10000

View File

@@ -1,13 +1,14 @@
name: Clang-tidy check
on:
schedule:
- cron: '0 6 * * 1-5'
- cron: "0 6 * * 1-5"
workflow_dispatch:
pull_request:
branches: [develop]
paths:
- .clang_tidy
- .github/workflows/clang-tidy.yml
workflow_call:
jobs:
clang_tidy:
@@ -100,14 +101,14 @@ jobs:
GH_REPO: ${{ github.repository }}
GH_TOKEN: ${{ github.token }}
with:
commit-message: '[CI] clang-tidy auto fixes'
commit-message: "[CI] clang-tidy auto fixes"
committer: Clio CI <skuznetsov@ripple.com>
branch: 'clang_tidy/autofix'
branch: "clang_tidy/autofix"
branch-suffix: timestamp
delete-branch: true
title: '[CI] clang-tidy auto fixes'
body: 'Fixes #${{ steps.create_issue.outputs.created_issue }}. Please review and commit clang-tidy fixes.'
reviewers: 'cindyyan317,godexsoft,kuznetsss'
title: "[CI] clang-tidy auto fixes"
body: "Fixes #${{ steps.create_issue.outputs.created_issue }}. Please review and commit clang-tidy fixes."
reviewers: "cindyyan317,godexsoft,kuznetsss"
- name: Fail the job
if: ${{ steps.run_clang_tidy.outcome != 'success' }}

View File

@@ -0,0 +1,11 @@
name: On clang-tidy auto fixes merged
on:
pull_request:
types: [closed]
branches: [develop]
jobs:
on_fix_merge:
if: ${{ github.event.pull_request.merged == true && github.event.pull_request.labels.*.name == '[CI] clang-tidy auto fixes' }}
uses: ./.github/workflows/clang-tidy.yml
secrets: inherit