Skip to main content

Overview

The ORCA Quality Gate is a GitHub Action that runs data quality scans as part of your CI/CD pipeline. It scans a connected data source, evaluates the quality score against a configurable threshold, and posts results as a PR comment. Use it to prevent merging code that degrades data quality.

Quick start

Add the action to any workflow file in .github/workflows/:

Inputs

Outputs

Using outputs in subsequent steps

PR comment

On pull request events, the action automatically posts (or updates) a comment on the PR with scan results:
The comment is updated in place on re-runs so your PR stays clean.

Pass/fail behavior

The action exits with code 1 (fails the step) when either condition is met:
  1. Score threshold: Quality score is below min-score
  2. Critical alerts: Any critical-severity alerts exist and fail-on-critical is true
Both conditions are evaluated independently. A scan can fail on critical alerts even if the score is above the threshold.

Examples

Scan a specific table

Matrix strategy for multi-source scanning

Scan multiple data sources in parallel:

Warn without failing

Set min-score to 0 and fail-on-critical to false to run the scan and post the PR comment without blocking the build:

Scheduled quality check

Run quality scans on a cron schedule outside of PRs:

How it works

  1. Sets up Python 3.11 and installs orca-cli
  2. Runs orca scan --wait --format json against the specified source
  3. Parses the JSON output to extract the quality score and alerts
  4. Sets GitHub Action outputs (quality-score, alerts-count, result-url)
  5. On pull request events, posts or updates a Markdown comment on the PR
  6. Exits with code 0 (pass) or 1 (fail) based on thresholds

Secrets setup

Store your ORCA credentials as GitHub repository secrets:
  1. Go to Settings > Secrets and variables > Actions
  2. Add ORCA_API_KEY with your ORCA API key
  3. Add ORCA_API_URL with your ORCA instance URL (e.g. https://api.orca-klavest.app)
  4. Optionally add ORCA_SOURCE_ID if you want to reference it as a secret