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 retention-days: 30
- name: Upload coverage report - name: Upload coverage report
uses: codecov/codecov-action@v3 uses: wandalen/wretry.action@v1.3.0
with: with:
action: codecov/codecov-action@v3
with: |
files: build/coverage_report.xml files: build/coverage_report.xml
fail_ci_if_error: true fail_ci_if_error: true
verbose: true verbose: true
token: ${{ env.CODECOV_TOKEN }} token: ${{ env.CODECOV_TOKEN }}
attempt_limit: 5
attempt_delay: 10000

View File

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