CI: fix ccache key to use branch name instead of merge ref

github.ref_name resolves to '26367/merge' for pull_request events,
causing cache misses. Use github.head_ref (PR source branch) with
fallback to github.ref_name for push events.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
This commit is contained in:
Ramon Roche 2026-02-09 14:28:48 -08:00
parent 618a6aa98f
commit 29fefeeada

View File

@ -35,9 +35,9 @@ jobs:
uses: runs-on/cache/restore@v4
with:
path: ~/.ccache
key: ccache-clang-tidy-${{ github.ref_name }}
key: ccache-clang-tidy-${{ github.head_ref || github.ref_name }}
restore-keys: |
ccache-clang-tidy-${{ github.ref_name }}-
ccache-clang-tidy-${{ github.head_ref || github.ref_name }}-
ccache-clang-tidy-main-
ccache-clang-tidy-