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