Closed jongwooo closed 1 year ago
Signed-off-by: jongwooo han980817@gmail.com
I changed the workflow to cache dependencies using actions/setup-node. actions/setup-node@v2 or newer has caching built-in so you no longer need to setup actions/cache.
actions/setup-node@v2
actions/cache
- name: Setup Node uses: actions/setup-node@v3 with: node-version: '16' - name: Get yarn cache id: yarn-cache run: echo "::set-output name=dir::$(yarn cache dir)" - name: Cache dependencies uses: actions/cache@v2 with: path: ${{ steps.yarn-cache.outputs.dir }} key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} restore-keys: | ${{ runner.os }}-yarn-
- name: Setup Node uses: actions/setup-node@v3 with: node-version: '16' cache: yarn
It’s literally a one line change to pass the cache: yarn input parameter.
cache: yarn
@JacksonGL has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.
Signed-off-by: jongwooo han980817@gmail.com
Description
I changed the workflow to cache dependencies using actions/setup-node.
actions/setup-node@v2
or newer has caching built-in so you no longer need to setupactions/cache
.AS-IS
TO-BE
References