diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 185ed9a..bd3e36b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,11 +18,22 @@ jobs: uses: actions/setup-node@v6 with: node-version: "22" - cache: "yarn" - name: Enable Corepack run: corepack enable + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT + + - name: Cache yarn dependencies + uses: actions/cache@v4 + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + - name: Install dependencies run: yarn install --frozen-lockfile diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index d8ad201..a3c6afb 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -18,11 +18,22 @@ jobs: uses: actions/setup-node@v6 with: node-version: "22" - cache: "yarn" - name: Enable Corepack run: corepack enable + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT + + - name: Cache yarn dependencies + uses: actions/cache@v4 + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + - name: Install dependencies run: yarn install --frozen-lockfile