name: 'Setup pnpm' author: Luna description: 'Setup Node.js, pnpm, and install dependencies' inputs: build_filter: description: 'The filter argument for pnpm build (e.g. ./easytier-web/*)' required: true runs: using: "composite" steps: - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: 22 - name: Install pnpm uses: pnpm/action-setup@v4 with: version: 10 run_install: false - name: Get pnpm store directory shell: bash run: | echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV - name: Setup pnpm cache uses: actions/cache@v4 with: path: ${{ env.STORE_PATH }} key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} restore-keys: | ${{ runner.os }}-pnpm-store- - name: Install and build shell: bash run: | pnpm -r install echo "Building with filter: ${{ inputs.build_filter }}" pnpm -r --filter "${{ inputs.build_filter }}" build