ci: avoid pnpm setup action download · openclaw/openclaw@13f72e4
steipete
·
2026-05-26
·
via Recent Commits to openclaw:main
File tree
.github/actions/setup-pnpm-store-cache
| Original file line number | Diff line number | Diff line change |
|---|
@@ -47,12 +47,22 @@ runs:
|
47 | 47 | openclaw_ensure_node "$requested_node" |
48 | 48 | |
49 | 49 | - name: Setup pnpm from packageManager |
50 | | -uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 |
51 | | -with: |
52 | | -package_json_file: ${{ inputs.package-manager-file }} |
53 | | -run_install: false |
54 | | -cache: ${{ inputs.use-actions-cache == 'true' && runner.os != 'Windows' }} |
55 | | -cache_dependency_path: ${{ inputs.lockfile-path }} |
| 50 | +shell: bash |
| 51 | +env: |
| 52 | +COREPACK_ENABLE_DOWNLOAD_PROMPT: "0" |
| 53 | +PACKAGE_MANAGER_FILE: ${{ inputs.package-manager-file }} |
| 54 | +run: | |
| 55 | + set -euo pipefail |
| 56 | + package_manager="$(node -e "const pkg = require(process.argv[1]); process.stdout.write(pkg.packageManager || '')" "$PACKAGE_MANAGER_FILE")" |
| 57 | + case "$package_manager" in |
| 58 | + pnpm@*) ;; |
| 59 | + *) |
| 60 | + echo "::error::Expected packageManager to pin pnpm, got '${package_manager:-<empty>}'" |
| 61 | + exit 1 |
| 62 | + ;; |
| 63 | + esac |
| 64 | + corepack enable |
| 65 | + corepack prepare "$package_manager" --activate |
56 | 66 | |
57 | 67 | - name: Ensure pnpm store cache directory exists |
58 | 68 | if: ${{ inputs.use-actions-cache == 'true' && runner.os != 'Windows' }} |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。