Files
directus/.github/actions/prepare/action.yml
Pascal Jufer 5b256f64c6 Use pnpm 8.1.0, define version via packageManager field, clean-up other version definitions (#17993)
* Use `packageManager` field to define pnpm version in one place

* Update to pnpm 8.1.0 (see also #17990)

* Enforce pnpm >= 8 via `engines`

* Clean-up `engines` & remove `volta`

* Add dedup workaround, consolidate test env prepare steps

* No checkout, no action :-)

* Bump minimal pnpm version to 8.1.0

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>

---------

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2023-04-04 15:20:25 -04:00

51 lines
1.2 KiB
YAML

name: Prepare
description: Install and build the app
inputs:
build:
description: Build the production bundle of the platform
required: false
default: 'true'
registry:
description: NPM registry to set up for auth
required: false
runs:
using: 'composite'
steps:
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18
registry-url: ${{ inputs.registry }}
- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
shell: bash
run: pnpm install
- name: Build
if: inputs.build == 'true'
shell: bash
run: pnpm run -r --workspace-concurrency=1 build
env:
NODE_OPTIONS: --max_old_space_size=6144