GitHub Action overview
The kylebastien/sextant-mcp/action action runs Sextant against your
PR: regression-grades the head against the base, posts a single review
comment with the new and fixed findings, and sets the check status from
the verdict.
It uses the same engine as the CLI, so the rules you tune locally are the rules CI runs.
Quick start
Section titled “Quick start”name: Sextanton: pull_request:
permissions: contents: read pull-requests: write
jobs: grade: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: # Required: the action diffs against `base.sha`, which the # checkout shallow-clone hides by default. fetch-depth: 0 - uses: kylebastien/sextant-mcp/action@v0.1.0 with: fail-on: errorThat’s it. On the next PR, you’ll see a single review comment from the action with the new and fixed findings, and a check named “Sextant” that goes red on regression.
What it does
Section titled “What it does”- Resolves the base ref — input
base, thenpull_request.base.sha, thenorigin/main. - Restores the baseline cache — keyed on the base SHA. A miss
recomputes from
git2blob reads (no checkout required). - Installs the matching
sextantbinary from the GitHub Release matchingversion(defaultlatest), verifyingSHA256SUMS. - Runs
sextant grade --pr— emits a markdown review and asextant-report.jsonfor the action to parse. - Posts (or PATCHes) a single PR review comment carrying a
<!-- sextant:review -->marker so subsequent runs update the same thread. - Sets the workflow exit status from the JSON, not the CLI’s exit
code — so the action can render the review even when the verdict is
request_changes. - Saves the baseline cache (only on
pushto the default branch). - (optional) Uploads SARIF to GitHub Code Scanning.
Detailed reference
Section titled “Detailed reference”- Inputs — every input with defaults.
- Outputs —
verdict,new-errors,new-warnings. - Baseline cache — how regression grading stays fast.
- Forks and tokens —
permissions, fork PRs, and
pull_request_target.
Requirements
Section titled “Requirements”actions/checkout@v4withfetch-depth: 0so the base SHA is reachable.pull-requests: writepermission (default for branches inside the same repo; not for forks).contents: readpermission.- Optionally
security-events: writeforupload-sarif.
With LLM rules
Section titled “With LLM rules”Add a step env block with your provider’s API key:
- uses: kylebastien/sextant-mcp/action@v0.1.0 env: ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} with: fail-on: errorOr pass no-llm: true to skip judge-evaluated rules entirely.
Pinning a version
Section titled “Pinning a version”Pin a specific tag for reproducible builds:
- uses: kylebastien/sextant-mcp/action@v0.1.0 with: version: v0.1.0 # match the action version to a CLI releaseversion defaults to latest, which fetches the latest GitHub Release
of the CLI on every run. For most projects, pinning the action and
the CLI version is the right call — Sextant’s rules and thresholds are
part of your CI’s contract.