diff --git a/.github/workflows/code-style.yml b/.github/workflows/code-style.yml index f2988ad..a8e69b5 100644 --- a/.github/workflows/code-style.yml +++ b/.github/workflows/code-style.yml @@ -10,10 +10,22 @@ jobs: - name: Checkout code uses: actions/checkout@v2 + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "::set-output name=dir::$(yarn config get cacheFolder)" + + - uses: actions/cache@v2 + id: yarn-cache + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + - name: Install packages uses: borales/actions-yarn@v2.0.0 with: - cmd: install + cmd: --frozen-lockfile - name: Run prettier uses: borales/actions-yarn@v2.0.0