mirror of
https://github.com/yanhao98/composite-actions.git
synced 2026-02-05 02:10:33 +08:00
更新 actions/setup-node 操作,添加 pnpm 缓存支持和条件逻辑
This commit is contained in:
@@ -187,9 +187,16 @@ runs:
|
|||||||
package_json_file: ${{ inputs.working-directory }}/package.json
|
package_json_file: ${{ inputs.working-directory }}/package.json
|
||||||
|
|
||||||
- uses: actions/setup-node@v5 # https://github.com/actions/setup-node?tab=readme-ov-file#usage
|
- 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:
|
with:
|
||||||
node-version: ${{ steps.prepare.outputs.nodeVersion }}
|
node-version: ${{ steps.prepare.outputs.nodeVersion }}
|
||||||
cache: ''
|
|
||||||
|
|
||||||
- id: pnpm-store-dir
|
- id: pnpm-store-dir
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|||||||
Reference in New Issue
Block a user