File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 13
13
- name : Run Clang-Tidy
14
14
run : |
15
15
CHANGED_FILES=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }})
16
- if echo "$CHANGED_FILES" | grep -E '\.(cpp|h|hpp|cc|cxx|hxx)$' > /dev/null ; then
16
+ if echo "$CHANGED_FILES" | grep -qE '\.(cpp|h|hpp|cc|cxx|hxx)$'; then
17
17
echo -e "Running clang-tidy"
18
18
bazel build //... \
19
19
--aspects @bazel_clang_tidy//clang_tidy:clang_tidy.bzl%clang_tidy_aspect \
Original file line number Diff line number Diff line change 2
2
name : Lint YAML files
3
3
on : # yamllint disable-line rule:truthy
4
4
pull_request :
5
- paths : ['**/*.yml', '**/*.yaml ']
5
+ branches : ['*']
6
6
jobs :
7
7
lint :
8
8
runs-on : ubuntu-latest
15
15
pip install yamllint
16
16
- name : Lint YAML files
17
17
run : |
18
- yamllint . || exit 1
18
+ CHANGED_FILES=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }})
19
+ if echo "$CHANGED_FILES" | grep -qE '\.(yml|yaml)$'; then
20
+ echo -e "Running yamllint"
21
+ yamllint . || exit 1
22
+ else
23
+ echo -e "Skipping yamllint since no YAML files were changed."
24
+ fi
You can’t perform that action at this time.
0 commit comments