@@ -36,20 +36,27 @@ jobs:
|
||||
|
||||
- name: 准备 | 安装包管理器
|
||||
run: |
|
||||
npm install -g pnpm
|
||||
npm install -g pnpm@${{ env.PNPM_VERSION }}
|
||||
pnpm --version
|
||||
echo "✅ 包管理器安装成功"
|
||||
|
||||
- name: 准备 | 获取项目依赖哈希
|
||||
- name: 准备 | 获取依赖哈希
|
||||
id: files-hash
|
||||
uses: actions/files-hash@v0.1
|
||||
with:
|
||||
files: "**/pnpm-lock.yaml"
|
||||
|
||||
- name: 准备 | 获取依赖目录
|
||||
id: dependencies
|
||||
run: |
|
||||
DEPEND=$(pnpm store path)
|
||||
echo "DEPEND=$DEPEND" >> $GITEA_OUTPUT
|
||||
echo "✅ 依赖目录: $DEPEND"
|
||||
|
||||
- name: 准备 | 配置依赖缓存
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
path: ${{ steps.dependencies.outputs.DEPEND }}
|
||||
key: ${{ runner.os }}-pnpm-store-${{ steps.files-hash.outputs.hash }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pnpm-store-
|
||||
|
||||
Reference in New Issue
Block a user