[Buildsystem] Ping master cache after saving cache

This should improve cache retention on large builds.

(cherry picked from commit 8e4e1451ec2d03761446d50ed3b14338d15a8b0e)
This commit is contained in:
A Thousand Ships authored and Thaddeus Crews committed 2026-08-12 11:26:25 -05:00
1 parent d94b859346
commit 4903553e2c
1 file changed
+11
@@ -20,3 +20,14 @@ runs:
with:
path: ${{ inputs.scons-cache }}
key: ${{ inputs.cache-name }}|${{ github.ref_name }}|${{ github.sha }}
# This is done after saving the new cache so that the base cache remains more relevant, to reduce
# the risk of the cache being purged when multiple large PRs are pushed/merged at the same time.
- name: Ping default cache
uses: actions/cache/restore@v6
if: github.ref_name != github.event.repository.default_branch
with:
path: ${{ inputs.scons-cache }}
key: ${{ inputs.cache-name }}|${{ github.event.repository.default_branch }}|${{ github.sha }}
restore-keys: ${{ inputs.cache-name }}|${{ github.event.repository.default_branch }}
lookup-only: true