更新缓存恢复键,以使用 GitHub 仓库 ID 代替工作区路径,增强缓存管理逻辑

This commit is contained in:
严浩
2025-04-11 14:16:47 +08:00
parent 4ce6f13923
commit 5595f58c87

View File

@ -180,9 +180,9 @@ runs:
uses: actions/cache/restore@v4 # https://github.com/actions/cache/blob/main/restore/action.yml
with:
path: ${{ steps.pnpm-store-dir.outputs.pnpmStoreDir }}
key: ${{ runner.os }}-pnpm-store-${{ github.workspace }}-${{ hashFiles('**/pnpm-lock.yaml') }}
key: ${{ runner.os }}-pnpm-store-${{ github.repository_id }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-${{ github.workspace }}-
${{ runner.os }}-pnpm-store-${{ github.repository_id }}-
${{ runner.os }}-pnpm-store-
# https://github.com/pnpm/pnpm/issues/7192#issuecomment-2353298966