mirror of
https://github.com/yanhao98/composite-actions.git
synced 2025-07-13 14:50:48 +08:00
修复缓存命中状态的输出逻辑,并更新 pnpm 缓存保存条件
This commit is contained in:
@ -182,6 +182,7 @@ runs:
|
|||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-pnpm-store-
|
${{ runner.os }}-pnpm-store-
|
||||||
|
|
||||||
|
# https://github.com/pnpm/pnpm/issues/7192#issuecomment-2353298966
|
||||||
- run: echo "package-import-method=hardlink" >> .npmrc
|
- run: echo "package-import-method=hardlink" >> .npmrc
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
@ -212,14 +213,11 @@ runs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- id: cache-pnpm-save
|
- id: cache-pnpm-save
|
||||||
if: always() && steps.cache-pnpm-restore.outputs.cache-hit == 'false'
|
if: always() && steps.cache-pnpm-restore.outputs.cache-hit != 'true'
|
||||||
uses: actions/cache/save@v4
|
uses: actions/cache/save@v4
|
||||||
with:
|
with:
|
||||||
path: ${{ steps.pnpm-store-dir.outputs.pnpmStoreDir }}
|
path: ${{ steps.pnpm-store-dir.outputs.pnpmStoreDir }}
|
||||||
key: ${{ steps.cache-pnpm-restore.outputs.cache-primary-key }}
|
key: ${{ steps.cache-pnpm-restore.outputs.cache-primary-key }}
|
||||||
# # https://github.com/pnpm/pnpm/issues/7192#issuecomment-2353298966
|
|
||||||
# package-import-method=hardlink
|
|
||||||
|
|
||||||
# rm -r node_modules
|
# rm -r node_modules
|
||||||
# pnpm fetch
|
# pnpm fetch
|
||||||
# pnpm install --offline
|
# pnpm install --offline
|
||||||
|
Reference in New Issue
Block a user