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_NAME` | <p>Name to give the uploaded artifact</p> | `false` | `dist` |
| `ARTIFACT_PATH` | <p>Path to upload as the 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` | | `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-inputs source="action.yml" -->
<!-- action-docs-runs source="action.yml" --> <!-- action-docs-runs source="action.yml" -->
+7 -1
View File
@@ -19,6 +19,9 @@ inputs:
COPY_PRISMA_ENGINE: COPY_PRISMA_ENGINE:
description: "Copy the Prisma query engine binaries into the build directory" description: "Copy the Prisma query engine binaries into the build directory"
default: "false" default: "false"
WORKING_DIRECTORY:
description: "Working directory for install, build, and artifact steps"
default: "."
runs: runs:
using: composite using: composite
@@ -28,14 +31,16 @@ runs:
- uses: actions/setup-node@v5 - uses: actions/setup-node@v5
with: with:
node-version-file: package.json node-version-file: ${{ inputs.WORKING_DIRECTORY }}/package.json
- name: Install - name: Install
shell: sh shell: sh
working-directory: ${{ inputs.WORKING_DIRECTORY }}
run: ${{ inputs.INSTALL_CMD }} run: ${{ inputs.INSTALL_CMD }}
- name: Build - name: Build
shell: sh shell: sh
working-directory: ${{ inputs.WORKING_DIRECTORY }}
run: | run: |
npm run ${{ inputs.BUILD_SCRIPT }} npm run ${{ inputs.BUILD_SCRIPT }}
if [ -n "${{ inputs.EXTRA_BUILD_SCRIPT }}" ]; then if [ -n "${{ inputs.EXTRA_BUILD_SCRIPT }}" ]; then
@@ -45,6 +50,7 @@ runs:
- name: Copy Prisma Client Engine - name: Copy Prisma Client Engine
if: inputs.COPY_PRISMA_ENGINE == 'true' if: inputs.COPY_PRISMA_ENGINE == 'true'
shell: sh shell: sh
working-directory: ${{ inputs.WORKING_DIRECTORY }}
run: | run: |
mkdir -p build/prisma mkdir -p build/prisma
cp node_modules/.prisma/client/libquery_engine-* build/prisma/ cp node_modules/.prisma/client/libquery_engine-* build/prisma/