Repository navigation
PGRun — Disposable PostgreSQL for any stack, any agent, any CI. We provide the database; you decide what runs against it.
New: pgrundev/ci-action/database@v1
One step gives your job an isolated PostgreSQL database. Your own steps then use it, with any framework, language or tool.
- uses: pgrundev/ci-action/database@v1
with:
token: ${{ secrets.PGRUN_API_TOKEN }}
- run: npm ci && npx prisma migrate deploy && npm test # anything: DATABASE_URL is set- Data:
sanitizedis a branch of your Safe Copy (production-like data under your approved Protect policy).schema-onlygives empty tables from a CI template. - Several databases: with
branches: 1–16,DATABASE_URL_1..Nare set too. - Connection:
DATABASE_URL(orenv-name) is exported to later steps, or kept in the step's outputs only withexport-env: false. URL and password are masked in the logs. - Cleanup: the action deletes exactly the branches it created when the job ends, on success, failure or cancellation. If the runner dies, PGRun deletes them at their TTL (
1hor6h). - Gates: the same as the Rails preset. Protect must be active and the Safe Copy usable. Sanitized data is refused for fork pull requests and, by default, public repositories.
pull_request_targetis always refused. - Scope: no framework detection, no language setup, no migrations, no test runner.
Docs, with Rails, Django, Prisma and Go examples: docs/database.md.
Unchanged: pgrundev/ci-action@v1 (Rails preset)
action.yml and lib/ are byte-identical to v1.0.0. Existing workflows keep working with no change.
Verified on real GitHub-hosted runners
- Provisioning: sanitized and schema-only branches,
DATABASE_URLin later steps,export-env: false. - Concurrency: three concurrent jobs under a full branch quota, each waiting for capacity and staying isolated.
- Cleanup: after a failing command, after cancellation during provisioning and during the command, and by TTL after the runner was killed.
- Rails preset: fast and production-like modes.
- Leaks: 0 credential leaks in any log, and 0 orphaned branches.