mirror of https://github.com/openclaw/openclaw.git
ci: harden pnpm sticky cache on PRs
This commit is contained in:
parent
b0f717aa02
commit
29b36f8e4a
|
|
@ -10,7 +10,7 @@ inputs:
|
|||
required: false
|
||||
default: "node24"
|
||||
use-sticky-disk:
|
||||
description: Use Blacksmith sticky disks instead of actions/cache for pnpm store.
|
||||
description: Use Blacksmith sticky disks instead of actions/cache for pnpm store on trusted runs.
|
||||
required: false
|
||||
default: "false"
|
||||
use-restore-keys:
|
||||
|
|
@ -51,10 +51,10 @@ runs:
|
|||
run: echo "path=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Mount pnpm store sticky disk
|
||||
if: inputs.use-sticky-disk == 'true'
|
||||
if: inputs.use-sticky-disk == 'true' && github.event_name != 'pull_request'
|
||||
uses: useblacksmith/stickydisk@v1
|
||||
with:
|
||||
key: ${{ github.repository }}-pnpm-store-${{ runner.os }}-${{ inputs.cache-key-suffix }}
|
||||
key: ${{ github.repository }}-pnpm-store-${{ runner.os }}-${{ github.ref_name }}-${{ inputs.cache-key-suffix }}-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
path: ${{ steps.pnpm-store.outputs.path }}
|
||||
|
||||
- name: Restore pnpm store cache (exact key only)
|
||||
|
|
|
|||
Loading…
Reference in New Issue