Skip to content

armgit / godot

Public Imported from GitHub
0

Godot Engine – Multi-platform 2D and 3D game engine

[Buildsystem] Ping `master` cache after saving cache

A Thousand Ships8e4e1451ec2d
diff --git a/.github/actions/godot-cache-save/action.yml b/.github/actions/godot-cache-save/action.yml
index f2d4455310a..507a12d7942 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