From 4903553e2c86e3103531713980df3598cf955738 Mon Sep 17 00:00:00 2001 From: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> Date: Fri, 31 Jul 2026 14:37:15 +0200 Subject: [PATCH] [Buildsystem] Ping `master` cache after saving cache This should improve cache retention on large builds. (cherry picked from commit 8e4e1451ec2d03761446d50ed3b14338d15a8b0e) --- .github/actions/godot-cache-save/action.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/actions/godot-cache-save/action.yml b/.github/actions/godot-cache-save/action.yml index f2d4455310..507a12d794 100644 --- a/.github/actions/godot-cache-save/action.yml +++ b/.github/actions/godot-cache-save/action.yml @@ -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