blocks-template icon indicating copy to clipboard operation
blocks-template copied to clipboard

chore: Use setup-node action to cache dependencies

Open jongwooo opened this issue 3 years ago • 0 comments

Signed-off-by: jongwooo [email protected]

Details

Updated workflows to cache dependencies using actions/setup-node. setup-node@v3 or newer has caching built-in.

AS-IS

- name: Checkout code
  uses: actions/checkout@v3

- name: Install dependencies
  run: yarn install

TO-BE

- name: Checkout code
  uses: actions/checkout@v3

- name: Set up Node.js
  uses: actions/setup-node@v3
  with:
    node-version: 18.x
    cache: yarn

- name: Install dependencies
  run: yarn install --immutable

It’s literally a one line change to pass the cache: yarn input parameter.

References

jongwooo avatar Dec 05 '22 17:12 jongwooo