add working dir to node build

This commit is contained in:
2026-05-29 11:21:41 -04:00
parent 1ffe0c23cb
commit 376a21630e
2 changed files with 8 additions and 1 deletions
+1
View File
@@ -17,6 +17,7 @@ Install dependencies, build, and upload a build artifact
| `ARTIFACT_NAME` | <p>Name to give the uploaded artifact</p> | `false` | `dist` |
| `ARTIFACT_PATH` | <p>Path to upload as the artifact</p> | `false` | `dist` |
| `COPY_PRISMA_ENGINE` | <p>Copy the Prisma query engine binaries into the build directory</p> | `false` | `false` |
| `WORKING_DIRECTORY` | <p>Working directory for install, build, and artifact steps</p> | `false` | `.` |
<!-- action-docs-inputs source="action.yml" -->
<!-- action-docs-runs source="action.yml" -->
+7 -1
View File
@@ -19,6 +19,9 @@ inputs:
COPY_PRISMA_ENGINE:
description: "Copy the Prisma query engine binaries into the build directory"
default: "false"
WORKING_DIRECTORY:
description: "Working directory for install, build, and artifact steps"
default: "."
runs:
using: composite
@@ -28,14 +31,16 @@ runs:
- uses: actions/setup-node@v5
with:
node-version-file: package.json
node-version-file: ${{ inputs.WORKING_DIRECTORY }}/package.json
- name: Install
shell: sh
working-directory: ${{ inputs.WORKING_DIRECTORY }}
run: ${{ inputs.INSTALL_CMD }}
- name: Build
shell: sh
working-directory: ${{ inputs.WORKING_DIRECTORY }}
run: |
npm run ${{ inputs.BUILD_SCRIPT }}
if [ -n "${{ inputs.EXTRA_BUILD_SCRIPT }}" ]; then
@@ -45,6 +50,7 @@ runs:
- name: Copy Prisma Client Engine
if: inputs.COPY_PRISMA_ENGINE == 'true'
shell: sh
working-directory: ${{ inputs.WORKING_DIRECTORY }}
run: |
mkdir -p build/prisma
cp node_modules/.prisma/client/libquery_engine-* build/prisma/