diff --git a/.github/workflows/clang-tidy.yml b/.github/workflows/clang-tidy.yml index 86b00af27b8..716d21a227b 100644 --- a/.github/workflows/clang-tidy.yml +++ b/.github/workflows/clang-tidy.yml @@ -38,7 +38,6 @@ jobs: - name: Checkout oneDNN uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: - ref: ${{ github.event.pull_request.head.ref }} fetch-depth: 0 repository: ${{ github.event.pull_request.head.repo.full_name }} @@ -56,7 +55,7 @@ jobs: run: | echo -e "Checking Clang-Tidy $(clang-tidy --version)\n" touch source-check.log - for file in $(git diff --name-only ${{ github.event.pull_request.base.sha }} | grep -E '\.cpp$'); + for file in $(git diff --name-only ${{ github.event.pull_request.head.sha }} ${{ github.event.pull_request.base.sha }} | grep -E '\.cpp$'); do if grep -q "$file" "build/compile_commands.json"; then echo -e "\nAnalyzing $file" @@ -74,7 +73,7 @@ jobs: run: | echo -e "Checking Clang-Tidy $(clang-tidy --version)\n" touch headers-check.log - for file in $(git diff --name-only ${{ github.event.pull_request.base.sha }} | grep -E '\.cpp$'); + for file in $(git diff --name-only ${{ github.event.pull_request.head.sha }} ${{ github.event.pull_request.base.sha }} | grep -E '\.cpp$'); do if grep -q "$file" "build/compile_commands.json"; then echo -e "\nAnalyzing $file"