mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-19 11:28:38 +00:00
CI: add exact-key mode for pnpm cache restore
This commit is contained in:
@@ -13,6 +13,10 @@ inputs:
|
|||||||
description: Use Blacksmith sticky disks instead of actions/cache for pnpm store.
|
description: Use Blacksmith sticky disks instead of actions/cache for pnpm store.
|
||||||
required: false
|
required: false
|
||||||
default: "false"
|
default: "false"
|
||||||
|
use-restore-keys:
|
||||||
|
description: Whether to use restore-keys fallback for actions/cache.
|
||||||
|
required: false
|
||||||
|
default: "true"
|
||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
steps:
|
steps:
|
||||||
@@ -49,8 +53,15 @@ runs:
|
|||||||
key: ${{ github.repository }}-pnpm-store-${{ runner.os }}-${{ inputs.cache-key-suffix }}
|
key: ${{ github.repository }}-pnpm-store-${{ runner.os }}-${{ inputs.cache-key-suffix }}
|
||||||
path: ${{ steps.pnpm-store.outputs.path }}
|
path: ${{ steps.pnpm-store.outputs.path }}
|
||||||
|
|
||||||
- name: Restore pnpm store cache
|
- name: Restore pnpm store cache (exact key only)
|
||||||
if: inputs.use-sticky-disk != 'true'
|
if: inputs.use-sticky-disk != 'true' && inputs.use-restore-keys != 'true'
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: ${{ steps.pnpm-store.outputs.path }}
|
||||||
|
key: ${{ runner.os }}-pnpm-store-${{ inputs.cache-key-suffix }}-${{ hashFiles('pnpm-lock.yaml') }}
|
||||||
|
|
||||||
|
- name: Restore pnpm store cache (with fallback keys)
|
||||||
|
if: inputs.use-sticky-disk != 'true' && inputs.use-restore-keys == 'true'
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: ${{ steps.pnpm-store.outputs.path }}
|
path: ${{ steps.pnpm-store.outputs.path }}
|
||||||
|
|||||||
Reference in New Issue
Block a user