You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit dae8ad9
Browse filesBrowse the repository at this point in the historyBrowse files
fix: install where the lockfile is, and test a repository with a prisma.config.ts end to end
A config file above the working directory was found, but the lockfile was
only looked for in the working directory, so the install was skipped. A
detected install now runs in the nearest folder with a lockfile, up to the
repository root. The install-command input still runs in the working
directory.
The end-to-end job for a repository with no Composer module now runs for
two apps. The new one, e2e/single-app-config, has a prisma.config.ts and
its own prisma in its lockfile (package-lock.json, 4,844 generated lines).
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -103,7 +103,7 @@ The Prisma CLI does the rest. It works out how to build and start the Service, b
103
103
104
104
- The action runs no install and no build of its own, and does not use the `install-command` and `build-command` inputs. A repository with a `prisma.config.ts` is the one exception, described below.
105
105
- The `prisma-version` input sets the CLI version. Set it to an exact version. Empty runs the newest release and logs a warning, because no lockfile pins the CLI in this mode.
106
-
- **A repository with a `prisma.config.ts` is installed first.** The CLI reads that file before it runs, and the file imports the repository's own packages. So the action runs the install command (`install-command`, else from the lockfile: npm, bun, pnpm or yarn), and the CLI then installs again as part of its build. When the install gives the repository its own `prisma` at 8.0.0-rc.37 or later and `prisma-version` is empty, the action runs that CLI (`npx --no-install prisma deploy`), because a config file must be read by the CLI from the same install.
106
+
- **A repository with a `prisma.config.ts` is installed first.** The CLI reads that file before it runs, and the file imports the repository's own packages. So the action runs the install command (`install-command`, else from the lockfile: npm, bun, pnpm or yarn), and the CLI then installs again as part of its build. A detected install runs in the nearest folder that has a lockfile, from the working directory up to the repository root, because the CLI also reads a config file above the working directory. The `install-command` input runs in the working directory. When the install gives the repository its own `prisma` at 8.0.0-rc.37 or later and `prisma-version` is empty, the action runs that CLI (`npx --no-install prisma deploy`), because a config file must be read by the CLI from the same install.
107
107
- A `prisma.config.ts` written for Prisma ORM 7 stops the deploy with `CLI.CONFIG_MISSING_MARKER`. The CLI refuses a config file that was not made with `definePrismaConfig`.
108
108
- A push to the default branch deploys to production, with no `--environment` argument.
109
109
- The Service deploys into the Project that has its name. The `name` input sets that name. Empty uses the `name` in `package.json`, else the folder name.
@@ -213,7 +213,7 @@ Branch names reach the action as environment variables and are passed to the `pr
213
213
214
214
Plain Node with zero dependencies and no build step. Inputs arrive as `INPUT_*` environment variables; outputs and state go to `$GITHUB_OUTPUT` and `$GITHUB_STATE`.
215
215
216
-
CI tests the action in three ways. Unit tests cover the scripts. A matrix runs the exact arguments the action passes against real `prisma` CLIs, including the npm `latest` tag. An end-to-end job runs the action itself (`uses: ./`) on the small app in `e2e/app`: it deploys to a new preview environment, checks the outputs and that the service answers, then destroys the environment. It runs once with the app's pinned versions and once moved to `prisma@latest`. The end-to-end job needs the `PRISMA_SERVICE_TOKEN` and `PRISMA_WORKSPACE_ID` secrets. A sweep step destroys `e2e-*` environments whose run has finished, which are ones an earlier run could not destroy. It fails only when such an environment is more than a day old. To remove one by hand, run `ENVIRONMENT=<name> bun scripts/destroy.ts` in `e2e/app` with `PRISMA_SERVICE_TOKEN` and `PRISMA_WORKSPACE_ID` set. The end-to-end job covers the `bun install` path with the app's own `prisma` devDependency. It does not cover `npm ci` or the `prisma-version` input. A second end-to-end job runs the action on `e2e/single-app`, an app with no Composer module, with `prisma@latest`. The action cannot destroy that deploy, so each run deploys into a Project of its own, named `cloud-deploy-action-e2e-single-<run id>-<attempt>`, and deletes the Project afterwards. A pull request run deploys to an environment named after its branch, and a run on `main` deploys to production. The job also deletes such Projects whose run has finished, and fails only when one is more than a day old. To remove one by hand, run `prisma project delete <project id> --confirm <project id>`. CI also runs every 6 hours. A failed or cancelled job on `main`, on a scheduled run, on a manual run or on a `prisma-released` dispatch posts to Slack through the `SLACK_WEBHOOK_URL` secret.
216
+
CI tests the action in three ways. Unit tests cover the scripts. A matrix runs the exact arguments the action passes against real `prisma` CLIs, including the npm `latest` tag. An end-to-end job runs the action itself (`uses: ./`) on the small app in `e2e/app`: it deploys to a new preview environment, checks the outputs and that the service answers, then destroys the environment. It runs once with the app's pinned versions and once moved to `prisma@latest`. The end-to-end job needs the `PRISMA_SERVICE_TOKEN` and `PRISMA_WORKSPACE_ID` secrets. A sweep step destroys `e2e-*` environments whose run has finished, which are ones an earlier run could not destroy. It fails only when such an environment is more than a day old. To remove one by hand, run `ENVIRONMENT=<name> bun scripts/destroy.ts` in `e2e/app` with `PRISMA_SERVICE_TOKEN` and `PRISMA_WORKSPACE_ID` set. The end-to-end job covers the `bun install` path with the app's own `prisma` devDependency. It does not cover `npm ci` or the `prisma-version` input. A second end-to-end job runs the action on two apps with no Composer module: `e2e/single-app`, with `prisma@latest`, and `e2e/single-app-config`, which has a `prisma.config.ts` and its own `prisma` in its lockfile. The action cannot destroy such a deploy, so each job deploys into a Project of its own, named `cloud-deploy-action-e2e-single-<run id>-<attempt>-<matrix entry>`, and deletes the Project afterwards. A pull request run deploys to an environment named after its branch, and a run on `main` deploys to production. The job also deletes such Projects whose run has finished, and fails only when one is more than a day old. To remove one by hand, run `prisma project delete <project id> --confirm <project id>`. CI also runs every 6 hours. A failed or cancelled job on `main`, on a scheduled run, on a manual run or on a `prisma-released` dispatch posts to Slack through the `SLACK_WEBHOOK_URL` secret.
217
217
218
218
Publishing a `v1.x.y` release, or promoting a prerelease to one, moves the `v1` tag to the newest published `v1.x.y` release (`.github/workflows/major-tag.yml`). Publishing a prerelease never moves it. To move it by hand, run that workflow.
Copy file name to clipboardExpand all lines: action.yml
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ inputs:
5
5
description: Your build command, run verbatim in both modes; the exact value "none" skips the build phase. Not used in single-app mode, where the Prisma CLI builds the Service
6
6
default: npm run build
7
7
install-command:
8
-
description: Empty auto-detects from the lockfile (npm ci or bun install --frozen-lockfile). In single-app mode the Prisma CLI installs the dependencies, and the action installs first only when the repository has a prisma.config.ts
8
+
description: Empty auto-detects from the lockfile (npm ci or bun install --frozen-lockfile; a Composer module with pnpm or yarn must set this). In single-app mode the Prisma CLI installs the dependencies, and the action installs first only when the repository has a prisma.config.ts, in the folder with the lockfile, and then also detects pnpm and yarn
9
9
default: ""
10
10
module:
11
11
description: Path to your app's Composer module. Empty uses module.ts when it exists; a repository with no module.ts deploys in single-app mode
0 commit comments