mirror of
https://github.com/imdap/ruoyi-plus-vben5.git
synced 2026-04-23 00:38:34 +08:00
- 将 .github/actions/setup-node/action.yml 中的 pnpm/action-setup 从 v4 升级到 v6 - 将 .github/workflows/ci.yml 中的 pnpm/action-setup 从 v5 升级到 v6 - 移除重复的 pnpm 安装步骤配置 - 统一使用最新的 pnpm action 版本以获得更好的兼容性 - 保持 run_install 配置为 false 以跳过自动安装依赖
41 lines
995 B
YAML
41 lines
995 B
YAML
name: 'Setup Node'
|
|
|
|
description: 'Setup node and pnpm'
|
|
|
|
runs:
|
|
using: 'composite'
|
|
steps:
|
|
- name: Install pnpm
|
|
uses: pnpm/action-setup@v6
|
|
|
|
- name: Install Node.js
|
|
uses: actions/setup-node@v6
|
|
with:
|
|
node-version-file: .node-version
|
|
cache: 'pnpm'
|
|
|
|
- name: Get pnpm store directory
|
|
shell: bash
|
|
run: |
|
|
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
|
|
|
- uses: actions/cache@v4
|
|
name: Setup pnpm cache
|
|
if: ${{ github.ref_name == 'main' }}
|
|
with:
|
|
path: ${{ env.STORE_PATH }}
|
|
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-pnpm-store-
|
|
|
|
- uses: actions/cache/restore@v4
|
|
if: ${{ github.ref_name != 'main' }}
|
|
with:
|
|
path: ${{ env.STORE_PATH }}
|
|
key: |
|
|
${{ runner.os }}-pnpm-store-
|
|
|
|
- name: Install dependencies
|
|
shell: bash
|
|
run: pnpm install --frozen-lockfile
|