From a5a791a7f8d97539ec216e1e1e31d89ce8ac2706 Mon Sep 17 00:00:00 2001 From: Slinetrac Date: Fri, 21 Nov 2025 13:47:30 +0800 Subject: [PATCH] fix(ci): pnpm cache --- .github/workflows/frontend-check.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/frontend-check.yml b/.github/workflows/frontend-check.yml index 8945bd9a8..3db52fb70 100644 --- a/.github/workflows/frontend-check.yml +++ b/.github/workflows/frontend-check.yml @@ -38,22 +38,26 @@ jobs: if: steps.check_frontend.outputs.frontend != 'true' run: echo "No frontend changes, skipping frontend checks." + - name: Install pnpm + if: steps.check_frontend.outputs.frontend == 'true' + uses: pnpm/action-setup@v4 + with: + run_install: false + - uses: actions/setup-node@v4 if: steps.check_frontend.outputs.frontend == 'true' with: - node-version: "lts/*" - - - run: corepack enable - if: steps.check_frontend.outputs.frontend == 'true' + node-version: "22" + cache: "pnpm" - name: Restore pnpm cache if: steps.check_frontend.outputs.frontend == 'true' uses: actions/cache@v4 with: path: ~/.pnpm-store - key: pnpm-store-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }} + key: "pnpm-shared-stable-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}" restore-keys: | - pnpm-store-${{ runner.os }}- + pnpm-shared-stable-${{ runner.os }}- - run: pnpm install --frozen-lockfile if: steps.check_frontend.outputs.frontend == 'true'