mirror of
https://github.com/yanhao98/composite-actions.git
synced 2025-12-16 10:50:30 +08:00
更新 actions/setup-node 操作,添加 pnpm 缓存支持和条件逻辑
This commit is contained in:
@@ -187,9 +187,16 @@ runs:
|
||||
package_json_file: ${{ inputs.working-directory }}/package.json
|
||||
|
||||
- uses: actions/setup-node@v5 # https://github.com/actions/setup-node?tab=readme-ov-file#usage
|
||||
if: steps.prepare.outputs.pnpmLockExists == 'true'
|
||||
with:
|
||||
node-version: ${{ steps.prepare.outputs.nodeVersion }}
|
||||
cache: 'pnpm'
|
||||
cache-dependency-path: ${{ inputs.working-directory }}/pnpm-lock.yaml
|
||||
|
||||
- uses: actions/setup-node@v5 # https://github.com/actions/setup-node?tab=readme-ov-file#usage
|
||||
if: steps.prepare.outputs.pnpmLockExists != 'true'
|
||||
with:
|
||||
node-version: ${{ steps.prepare.outputs.nodeVersion }}
|
||||
cache: ''
|
||||
|
||||
- id: pnpm-store-dir
|
||||
shell: bash
|
||||
|
||||
Reference in New Issue
Block a user