fix: use PR head SHA for cache-checkout key in pull_request_target events (#26686)

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
Keith Williams
2026-01-10 09:57:42 -03:00
committed by GitHub
co-authored by Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
parent d3e7554835
commit 728f55e4bc
+2 -2
View File
@@ -18,7 +18,7 @@ runs:
!.git
!node_modules
!**/node_modules
key: git-checkout-${{ github.head_ref || github.ref_name }}-${{ github.sha }}
key: git-checkout-${{ github.head_ref || github.ref_name }}-${{ github.event.pull_request.head.sha || github.sha }}
fail-on-cache-miss: true
- name: Delete previous git-checkout caches for this branch
@@ -37,4 +37,4 @@ runs:
!.git
!node_modules
!**/node_modules
key: git-checkout-${{ github.head_ref || github.ref_name }}-${{ github.sha }}
key: git-checkout-${{ github.head_ref || github.ref_name }}-${{ github.event.pull_request.head.sha || github.sha }}