Skip to content

Commit 8d80048

Browse files
authored
ci: clang-tidy: fix checkout procedure
1 parent 598e911 commit 8d80048

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

.github/workflows/clang-tidy.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ jobs:
3838
- name: Checkout oneDNN
3939
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
4040
with:
41-
ref: ${{ github.event.pull_request.head.ref }}
4241
fetch-depth: 0
4342
repository: ${{ github.event.pull_request.head.repo.full_name }}
4443

@@ -56,7 +55,7 @@ jobs:
5655
run: |
5756
echo -e "Checking Clang-Tidy $(clang-tidy --version)\n"
5857
touch source-check.log
59-
for file in $(git diff --name-only ${{ github.event.pull_request.base.sha }} | grep -E '\.cpp$');
58+
for file in $(git diff --name-only ${{ github.event.pull_request.head.sha }} ${{ github.event.pull_request.base.sha }} | grep -E '\.cpp$');
6059
do
6160
if grep -q "$file" "build/compile_commands.json"; then
6261
echo -e "\nAnalyzing $file"
@@ -74,7 +73,7 @@ jobs:
7473
run: |
7574
echo -e "Checking Clang-Tidy $(clang-tidy --version)\n"
7675
touch headers-check.log
77-
for file in $(git diff --name-only ${{ github.event.pull_request.base.sha }} | grep -E '\.cpp$');
76+
for file in $(git diff --name-only ${{ github.event.pull_request.head.sha }} ${{ github.event.pull_request.base.sha }} | grep -E '\.cpp$');
7877
do
7978
if grep -q "$file" "build/compile_commands.json"; then
8079
echo -e "\nAnalyzing $file"

0 commit comments

Comments
 (0)