Commit 953d929 1 parent cfdd868 commit 953d929 Copy full SHA for 953d929
File tree 1 file changed +6
-12
lines changed
1 file changed +6
-12
lines changed Original file line number Diff line number Diff line change @@ -20,14 +20,10 @@ jobs:
20
20
runs-on : ubuntu-latest
21
21
container : ghcr.io/autowarefoundation/autoware:latest-prebuilt-cuda
22
22
steps :
23
- - name : Set PR fetch depth
24
- run : echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> "${GITHUB_ENV}"
25
-
26
23
- name : Checkout PR branch and all PR commits
27
24
uses : actions/checkout@v4
28
25
with :
29
- ref : ${{ github.event.pull_request.head.sha }}
30
- fetch-depth : ${{ env.PR_FETCH_DEPTH }}
26
+ fetch-depth : 0
31
27
32
28
- name : Show disk space before the tasks
33
29
run : df -h
@@ -41,19 +37,17 @@ jobs:
41
37
42
38
- name : Get modified files
43
39
id : get-modified-files
44
- uses : tj-actions/changed-files@v42
45
- with :
46
- files : |
47
- **/*.cpp
48
- **/*.hpp
40
+ run : |
41
+ echo "changed_files=$(git diff --name-only "origin/${{ github.base_ref }}"...HEAD | grep -E '\.(cpp|hpp)$' || true)" >> $GITHUB_OUTPUT
42
+ shell : bash
49
43
50
44
- name : Run clang-tidy
51
- if : ${{ steps.get-modified-files.outputs.all_changed_files != '' }}
45
+ if : ${{ steps.get-modified-files.outputs.changed_files != '' }}
52
46
uses : autowarefoundation/autoware-github-actions/clang-tidy@v1
53
47
with :
54
48
rosdistro : humble
55
49
target-packages : ${{ steps.get-modified-packages.outputs.modified-packages }}
56
- target-files : ${{ steps.get-modified-files.outputs.all_changed_files }}
50
+ target-files : ${{ steps.get-modified-files.outputs.changed_files }}
57
51
clang-tidy-config-url : https://raw.githubusercontent.com/autowarefoundation/autoware/main/.clang-tidy
58
52
build-depends-repos : build_depends.repos
59
53
You can’t perform that action at this time.
0 commit comments