| 1 | name: Save Godot build cache |
| 2 | description: Save Godot build cache. |
| 3 | inputs: |
| 4 | cache-name: |
| 5 | description: The cache base name (job name by default). |
| 6 | default: ${{ github.job }} |
| 7 | scons-cache: |
| 8 | description: The SCons cache path. |
| 9 | default: ${{ github.workspace }}/.scons_cache/ |
| 10 | |
| 11 | runs: |
| 12 | using: composite |
| 13 | steps: |
| 14 | - name: Purge files before timestamp |
| 15 | shell: sh |
| 16 | run: misc/scripts/purge_cache.py ${{ env.CACHE_TIMESTAMP }} "${{ inputs.scons-cache }}" |
| 17 | |
| 18 | - name: Save SCons cache directory |
| 19 | uses: actions/cache/save@v5 |
| 20 | with: |
| 21 | path: ${{ inputs.scons-cache }} |
| 22 | key: ${{ inputs.cache-name }}|${{ github.ref_name }}|${{ github.sha }} |