Skip to content

Commit

Permalink
GitHub: Changes the C++ linting workflow to allow it to be required. (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
beqqrry-aws authored Feb 21, 2024
1 parent 921b3fb commit 4498483
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/sd-cpp-lint.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: "cpp lint check"
on:
pull_request:
paths:
- 'cpp/**'
workflow_dispatch:

jobs:
Expand All @@ -13,10 +11,19 @@ jobs:
pull-requests: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkout files
uses: actions/checkout@v4
with:
fetch-depth: 0
sparse-checkout: |
.github
cpp
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v41
with:
files: "cpp/**/*.{cpp,h}"
- name: "Run clang-tidy check"
if: steps.changed-files.outputs.any_changed == 'true'
uses: ./.github/sd-cpp-linter
with:
config_file: ./.github/cpp-linter/clang-tidy-config.txt
Expand Down

0 comments on commit 4498483

Please sign in to comment.