0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00
ghost/.github/actions/restore-cache/action.yml

25 lines
807 B
YAML
Raw Normal View History

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