action.yml raw
1 name: 'Cache Save'
2 description: 'Save a cache with WarpBuild on Warp runners and GitHub Actions cache otherwise'
3 inputs:
4 path:
5 description: 'A list of files, directories, and wildcard patterns to cache'
6 required: true
7 key:
8 description: 'An explicit key for saving the cache'
9 required: true
10 provider:
11 description: 'The cache provider to use'
12 required: true
13 runs:
14 using: 'composite'
15 steps:
16 - name: Save cache with WarpBuild
17 if: ${{ inputs.provider == 'warp' }}
18 uses: WarpBuilds/cache/save@v1
19 with:
20 path: ${{ inputs.path }}
21 key: ${{ inputs.key }}
22
23 - name: Save cache with GitHub Actions
24 if: ${{ inputs.provider == 'gha' }}
25 uses: actions/cache/save@v5
26 with:
27 path: ${{ inputs.path }}
28 key: ${{ inputs.key }}
29