Forgejo drop-in for pnpm/action-setup: install pnpm at a pinned or packageManager-declared version. No github.com.
- Shell 81.7%
- Makefile 18.3%
Install pnpm at a pinned or packageManager-declared version on Forgejo runners via the runner's npm. A pnpm/action-setup-style action with no github.com. Resolves version from the explicit input, then package.json packageManager (+sha stripped), then engines.pnpm, then latest. Optional run_install. Composite action, outputs the installed version. Offline suite covers version resolution + install/run against fake npm/pnpm; e2e installs pnpm 9 on a runner. |
||
|---|---|---|
| .forgejo/workflows | ||
| scripts | ||
| tests | ||
| .gitignore | ||
| action.yml | ||
| CHANGELOG.md | ||
| LICENSE | ||
| Makefile | ||
| MIGRATION.md | ||
| README.md | ||
Setup pnpm (Forgejo)
Forgejo's pnpm/action-setup. Install pnpm at a pinned or
packageManager-declared version on a self-hosted Forgejo runner, using the
runner's npm. No github.com, no PAT.
Part of the Fjord Actions
bundle. Pairs with
setup-node-action,
which installs Node but not pnpm.
Usage
jobs:
build:
runs-on: [self-hosted, Linux]
steps:
- uses: actions/checkout@v6
- uses: https://rasterhub.com/rasterstate/setup-node-action@v1
with:
node-version: '20'
cache: pnpm # backed by your S3 cache; needs the backend env
- uses: https://rasterhub.com/rasterstate/setup-pnpm-action@v1
with:
version: 9 # or omit to read packageManager from package.json
- run: pnpm install --frozen-lockfile
Order matters when you cache: install Node, then pnpm, then let
setup-node-action's cache: pnpm find the pnpm store. (Caching needs the
RASTER_CACHE_S3_* backend env on the job.)
Inputs
| Input | Default | Description |
|---|---|---|
version |
(resolved) | pnpm version (e.g. 9, 10, 8.15.4). If empty, resolved from package.json. |
run_install |
false |
Run pnpm install after installing pnpm. |
package_json_file |
package.json |
File to read the pnpm version from. |
dest |
Accepted for compatibility; informational (pnpm is installed globally via npm). |
Version resolution when version is empty: package.json packageManager
(pnpm@x.y.z, any +sha suffix stripped) -> engines.pnpm -> latest.
Outputs
| Output | Description |
|---|---|
version |
The installed pnpm version. |
See MIGRATION.md for differences from pnpm/action-setup.
License
MIT, see LICENSE.