2
mirror of https://github.com/pnpm/action-setup.git synced 2026-08-13 16:01:31 +00:00
Files
pnpm-action-setup/action.yml
T
Zoltan Kochan b543421fa5 feat: cache the lockfile verification log regardless of cache
The log is under a kilobyte and pnpm writes it on every install, not only
where supply-chain policies are configured: the integrity and tarball-URL
checks are unconditional. A job that starts without it re-checks every
lockfile entry against the registry — on a ~2000-entry lockfile with a warm
store, 13.5s vs 1.5s with `minimumReleaseAge` and `trustPolicy` configured,
and still 6.7s vs 1.6s with no policies at all.

Tying that to the `cache` input made the common case slow for no saving worth
counting, so the log is now restored and saved on its own key whether or not
the store is cached. `cache` goes back to meaning what its name says.
2026-08-13 16:56:49 +02:00

46 lines
1.5 KiB
YAML

name: Setup pnpm
description: Install pnpm package manager
branding:
icon: package
color: orange
inputs:
version:
description: Version of pnpm to install
required: false
dest:
description: Where to store pnpm files
required: false
default: ~/setup-pnpm
run_install:
description: If specified, run `pnpm install`
required: false
default: 'null'
cache:
description: |
Whether to cache the pnpm store directory, keyed on the lockfile's
content hash. On pnpm v11 and newer, the results of pnpm's lockfile
verification are cached either way — see the README.
required: false
default: 'false'
cache_dependency_path:
description: File path to the pnpm lockfile, whose contents hash will be used as a cache key. Accepts multiple paths delimited by newlines.
required: false
default: 'pnpm-lock.yaml'
package_json_file:
description: File path to the package.json to read "packageManager" configuration. This path must be relative to the repository root (GITHUB_WORKSPACE).
required: false
default: 'package.json'
standalone:
description: When set to true, @pnpm/exe, which is a Node.js bundled package, will be installed, enabling using pnpm without Node.js.
required: false
default: 'false'
outputs:
dest:
description: Expanded path of inputs#dest
bin_dest:
description: Location of `pnpm` and `pnpx` command
runs:
using: node24
main: dist/index.js
post: dist/index.js