name: Basic Setup
description: Install PNPM, Node, and dependencies

inputs:
  install:
    default: 'true'
    description: Whether or not to run 'pnpm install'

  installArgs:
    default: ''
    description: Additional args to append to "pnpm install"

runs:
  using: composite

  steps:
    - name: 🛠️ Setup PNPM
      uses: pnpm/action-setup@f2b2b233b538f500472c7274c7012f57857d8ce0 # v4.1.0

    - name: 🛠️ Setup NodeJS
      uses: actions/setup-node@b7234cc9fe124f0f4932554b4e5284543083ae7b # v4.4.0
      with:
        node-version: 20
        cache: pnpm

    - name: 📦 Install Dependencies
      if: ${{ inputs.install == 'true' }}
      shell: bash
      run: pnpm install ${{ inputs.installArgs }}
