From 0046867b13cd3246fdfffc9fecef20006b150679 Mon Sep 17 00:00:00 2001 From: jinrui Date: Fri, 3 Jan 2025 19:01:38 +0800 Subject: [PATCH] ci: pnpm cache install pnpm/exe when node16 (#8929) ci: pnpm cache support node16 --- .github/actions/pnpm-cache/action.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/actions/pnpm-cache/action.yml b/.github/actions/pnpm-cache/action.yml index 5e0bde94d6f0..633d6b8ff2b7 100644 --- a/.github/actions/pnpm-cache/action.yml +++ b/.github/actions/pnpm-cache/action.yml @@ -25,10 +25,21 @@ runs: node-version: ${{ inputs.node-version }} - name: Enable corepack + if: ${{ inputs.node-version != '16' }} shell: bash run: | corepack enable + # https://pnpm.io/continuous-integration#github-actions + # Uses `packageManagement` field from package.json + - name: Install pnpm + uses: pnpm/action-setup@v4 + if: ${{ inputs.node-version == '16' }} + with: + dest: ${{ runner.tool_cache }}/pnpm + # Use `@pnpm/exe` for Node 16 + standalone: true + - name: Get pnpm store directory id: pnpm-cache shell: bash