a5fe87cc4d
- we shouldn't cache the build assets against the yarn.lock hash because the files could change independent of that file - this bring the build caching more inline with https://github.com/getsentry/sentry-javascript/blob/develop/.github/workflows/build.yml, which is a big inspiration for this file
25 lines
807 B
YAML
25 lines
807 B
YAML
name: "Restore dependency & build cache"
|
|
description: "Restore the dependency & build cache."
|
|
|
|
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 }}
|
|
|
|
- name: Check build cache
|
|
uses: actions/cache/restore@v3
|
|
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.') |