mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-19 05:27:26 +00:00
CI: add sticky-disk mode to pnpm cache action
This commit is contained in:
@@ -9,6 +9,10 @@ inputs:
|
|||||||
description: Suffix appended to the cache key.
|
description: Suffix appended to the cache key.
|
||||||
required: false
|
required: false
|
||||||
default: "node22"
|
default: "node22"
|
||||||
|
use-sticky-disk:
|
||||||
|
description: Use Blacksmith sticky disks instead of actions/cache for pnpm store.
|
||||||
|
required: false
|
||||||
|
default: "false"
|
||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
steps:
|
steps:
|
||||||
@@ -38,7 +42,15 @@ runs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: echo "path=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT"
|
run: echo "path=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
|
- name: Mount pnpm store sticky disk
|
||||||
|
if: inputs.use-sticky-disk == 'true'
|
||||||
|
uses: useblacksmith/stickydisk@v1
|
||||||
|
with:
|
||||||
|
key: ${{ github.repository }}-pnpm-store-${{ runner.os }}-${{ inputs.cache-key-suffix }}
|
||||||
|
path: ${{ steps.pnpm-store.outputs.path }}
|
||||||
|
|
||||||
- name: Restore pnpm store cache
|
- name: Restore pnpm store cache
|
||||||
|
if: inputs.use-sticky-disk != '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