2023-07-10 15:22:17 +03:00
|
|
|
name: "Restore dependency & build cache"
|
|
|
|
description: "Restore the dependency & build cache."
|
2023-07-03 15:53:55 +03:00
|
|
|
|
|
|
|
runs:
|
|
|
|
using: "composite"
|
|
|
|
steps:
|
|
|
|
- name: Check dependency cache
|
|
|
|
id: dep-cache
|
|
|
|
uses: actions/cache/restore@v3
|
|
|
|
with:
|
|
|
|
path: ${{ env.CACHED_DEPENDENCY_PATHS }}
|
|
|
|
key: ${{ env.DEPENDENCY_CACHE_KEY }}
|
|
|
|
|
2023-07-10 15:22:17 +03:00
|
|
|
- name: Check build cache
|
|
|
|
uses: actions/cache/restore@v3
|
|
|
|
id: build-cache
|
|
|
|
with:
|
|
|
|
path: ${{ env.CACHED_BUILD_PATHS }}
|
|
|
|
key: ${{ github.sha }}
|
|
|
|
|
2023-07-03 15:53:55 +03:00
|
|
|
- name: Check if caches are restored
|
|
|
|
uses: actions/github-script@v6
|
2023-07-10 15:22:17 +03:00
|
|
|
if: steps.dep-cache.outputs.cache-hit != 'true' || steps.build-cache.outputs.cache-hit != 'true'
|
2023-07-03 15:53:55 +03:00
|
|
|
with:
|
2023-07-10 15:22:17 +03:00
|
|
|
script: core.setFailed('Dependency or build cache could not be restored - please re-run ALL jobs.')
|