add cache

This commit is contained in:
Baptiste Augrain
2021-03-10 18:58:36 +01:00
parent 78ba01d3a0
commit 2089830d92
4 changed files with 73 additions and 1 deletions

View File

@@ -54,6 +54,22 @@ jobs:
run: ./check_tags.sh
if: env.SHOULD_DEPLOY == 'yes'
- name: Compute cache key
id: yarnCacheKey
run: echo "::set-output name=value::$(node build/azure-pipelines/computeYarnCacheKey.js)"
- name: Get yarn cache directory path
id: yarnCacheDirPath
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache yarn directory
uses: actions/cache@v2
with:
path: ${{ steps.yarnCacheDirPath.outputs.dir }}
key: ${{ runner.os }}-yarnCacheDir-${{ steps.yarnCacheKey.outputs.value }}
restore-keys: ${{ runner.os }}-yarnCacheDir-
if: env.SHOULD_BUILD == 'yes'
- name: Build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}