diff --git a/node/README.md b/node/README.md index 613091b..5562d14 100644 --- a/node/README.md +++ b/node/README.md @@ -17,6 +17,7 @@ Install dependencies, build, and upload a build artifact | `ARTIFACT_NAME` |
Name to give the uploaded artifact
| `false` | `dist` | | `ARTIFACT_PATH` |Path to upload as the artifact
| `false` | `dist` | | `COPY_PRISMA_ENGINE` |Copy the Prisma query engine binaries into the build directory
| `false` | `false` | +| `WORKING_DIRECTORY` |Working directory for install, build, and artifact steps
| `false` | `.` | diff --git a/node/action.yml b/node/action.yml index 6c44430..7a2f2c4 100644 --- a/node/action.yml +++ b/node/action.yml @@ -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/