action.yml raw
1 name: 'Save Caches'
2 description: 'Save ccache, depends sources, and built depends caches'
3 runs:
4 using: 'composite'
5 steps:
6 - name: debug cache hit inputs
7 shell: bash
8 run: |
9 echo "depends sources direct cache hit to primary key: ${{ env.depends-sources-cache-hit }}"
10 echo "depends built direct cache hit to primary key: ${{ env.depends-built-cache-hit }}"
11 echo "previous releases direct cache hit to primary key: ${{ env.previous-releases-cache-hit }}"
12
13 - name: Save Ccache cache
14 uses: cirruslabs/cache/save@v4
15 if: ${{ (github.event_name == 'push') && (github.ref_name == github.event.repository.default_branch) }}
16 with:
17 path: ${{ env.CCACHE_DIR }}
18 key: ccache-${{ env.CONTAINER_NAME }}-${{ github.run_id }}
19
20 - name: Save depends sources cache
21 uses: cirruslabs/cache/save@v4
22 if: ${{ (github.event_name == 'push') && (github.ref_name == github.event.repository.default_branch) && (env.depends-sources-cache-hit != 'true') }}
23 with:
24 path: ${{ env.SOURCES_PATH }}
25 key: depends-sources-${{ env.CONTAINER_NAME }}-${{ env.DEPENDS_HASH }}
26
27 - name: Save built depends cache
28 uses: cirruslabs/cache/save@v4
29 if: ${{ (github.event_name == 'push') && (github.ref_name == github.event.repository.default_branch) && (env.depends-built-cache-hit != 'true' )}}
30 with:
31 path: ${{ env.BASE_CACHE }}
32 key: depends-built-${{ env.CONTAINER_NAME }}-${{ env.DEPENDS_HASH }}
33
34 - name: Save previous releases cache
35 uses: cirruslabs/cache/save@v4
36 if: ${{ (github.event_name == 'push') && (github.ref_name == github.event.repository.default_branch) && (env.previous-releases-cache-hit != 'true' )}}
37 with:
38 path: ${{ env.PREVIOUS_RELEASES_DIR }}
39 key: previous-releases-${{ env.CONTAINER_NAME }}-${{ env.PREVIOUS_RELEASES_HASH }}
40