Do this
supaschema scan check run on the pull-request head SHA, and updates one PR comment with the score and top issues. It requires checks: write for the check run and issues: write because GitHub stores pull-request timeline comments through the Issues comments API.
To include generated-contract usage diagnostics in that same scan report, pass the source directory explicitly:
Protected sync
Use the same action for a protected deploy job whensupaschema.config.json defines workflow.migration_sync, sync.targets, generated output policies, and deploy safety gates. The action passes argv through unchanged; it does not set remote approval for you.
Keep
- Use
fetch-depth: 0sogit:sources can read the base ref. - Pin a PostgreSQL major that matches production, or run a matrix over supported majors.
- Add
--ensure-roleswhen migrations grant to roles that a bare PostgreSQL service does not have. - Use
SUPASCHEMA_DATABASE_URLinstead of repeating--database-urlwhen multiple steps need the same target. - Set a remote approval variable, such as
SUPASCHEMA_REMOTE_SYNC_APPROVED, only in the protected workflow or environment that is allowed to deploy.
Verify
For a smaller drift-only gate:Related
CI gate
Decide which checks belong in required status.
Diff command
Compare configured sources or explicit refs.
Check command
See reporter and diagnostic options.
Verify command
Prove apply-twice behavior in a disposable database.

