0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2025-02-24 23:55:46 -05:00
verdaccio/.github/actions/install-app-node/action.yml

52 lines
1.5 KiB
YAML
Raw Normal View History

name: 'Install app with Node specific version'
description: 'install application'
inputs:
registry-url:
description: 'Registry URL for pnpm'
required: false
default: 'http://localhost:4873'
reporter:
description: 'Reporter for pnpm'
required: false
default: 'silent'
loglevel:
description: 'Log level for pnpm'
required: false
default: 'error'
node-version:
description: 'Node.js version to use'
required: true
runs:
using: composite
steps:
- name: Use Node
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
node-version: ${{ inputs.node-version }}
- name: Install pnpm
run: |
npm install --global corepack@latest
corepack enable
corepack prepare
shell: bash
- name: set store
run: |
if [ ! -d "$HOME/.pnpm-store" ]; then
mkdir -p $HOME/.pnpm-store
pnpm config set store-dir $HOME/.pnpm-store
else
echo "Store directory already exists. Skipping configuration."
fi
shell: bash
- name: Restore cache pnpm store
uses: ./.github/actions/cache-store
- name: Install
run: pnpm install --reporter=${{inputs.reporter}} --ignore-scripts --registry ${{ inputs.registry-url }} --loglevel=${{ inputs.loglevel }}
shell: bash
- name: Save cache pnpm store
if: steps.cache-npm.outputs.cache-hit == 'false'
uses: ./.github/actions/cache-store