Reference
GitHub Action
Official GitHub Actions wrapper for ota summaries, annotations, PR comments, and receipt artifacts.
Recommended next
Purpose
Use ota-run/action@v1 when GitHub Actions should publish the GitHub-native view of ota instead of forcing you to wire JSON parsing and artifact upload by hand.
The action stays thin: ota owns diagnosis and receipts, while GitHub Actions owns the workflow boundary and permissions.
- read-only readiness gates for pull requests and pushes
- baseline-aware regression gates against a restored receipt artifact
- outcome-first step summaries and sticky PR comments with explicit next steps
- step summaries and sticky comments from ota’s own markdown renderer
- annotations for findings from ota’s own GitHub renderer
- sticky pull-request comments when enabled
- uploaded JSON output and archived receipt artifacts with baseline or receipt references
Use when
- a pull request needs a trustworthy readiness summary in the GitHub UI
- the workflow should fail only on newly introduced blockers instead of all existing debt
- the repo wants
ota receipt --json --archiveartifacts without hand-written upload steps - annotations, step summaries, and sticky comments should all reuse ota’s own wording without a separate adapter script
- the workflow should stay small while the repo contract remains the source of truth
Canonical renderer reuse
The GitHub wrapper should not invent its own summary phrasing.
Use the same ota renderers everywhere so local CLI output, CI summaries, annotations, and pull-request comments all stay aligned.
- use
ota annotations --mode doctor --format markdownfor repo doctor step summaries and PR comments - use
ota annotations --mode workspace-doctor --format markdownfor workspace doctor summaries and PR comments - use
ota annotations --mode receipt-diff --format markdownfor baseline compare and regression-gate summaries - use
ota annotations --mode doctor --format githubor--mode workspace-doctor --format githubfor line annotations - keep wrapper code thin and let ota own the blocker, provenance, and next-step wording
Pair with setup
- use
ota-run/setup@v1when later steps in the same job need directotacommands such asota run setup,ota run ci, orota run deploy:cloudflare - keep
ota-run/action@v1as the GitHub-native reporting layer andota-run/setup@v1as the installer/bootstrap layer - if a later job also needs direct
otacommands, runota-run/setup@v1in that job too because GitHub Actions jobs do not share installed binaries
Quick start
name: readiness on: pull_request: push: permissions: actions: read contents: read pull-requests: write jobs: readiness: runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 - name: Publish ota readiness uses: ota-run/action@v1 with: command: receipt archive: true github-token: ${{ github.token }}Pinned artifact name
The canonical pull-request gate already restores the latest successful artifact named by artifact-name and fails only on newly introduced blockers.
Set artifact-name explicitly when the workflow should pin that receipt artifact name instead of using the default ota-readiness value.
permissions: actions: read contents: read pull-requests: write jobs: readiness: runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 - uses: actions/setup-node@v5 with: node-version: '22' - name: Publish ota readiness uses: ota-run/action@v1 with: command: receipt path: . archive: true artifact-name: ota-readiness github-token: ${{ github.token }}Command choice
- use
receiptwhen you want an archive-friendly, read-only repo receipt artifact - use
doctorwhen you want the richer readiness verdict and primary-blocker surface receiptis the better default for CI because it is read-only and durable
Install behavior
install: alwaysis the default and installs ota for the selected version on every runinstall: neverfails closed unless ota is already available on the runnerota-versionpins the ota release when installer-driven reproducibility matters- the action supports Linux, macOS, and Windows GitHub Actions runners
Inputs
commandchooses the ota surface to run and supportsreceiptordoctor; default:receipt.pathpasses the repo or contract target to ota; default:..baselinepasses an explicit receipt baseline toota receipt --baseline; it supportslatestor a receipt JSON file path.fail-on-new-blockersadds--fail-on-new-blockersfor receipt compares and lets the action block only on newly introduced blocker findings; default:true.working-directorycontrols the directory where the action invokes ota; default:..execution-modeselectsnativeorcontainerexecution when the chosen command supports mode-aware output; default:native.memberpasses an optional monorepo member target.archiveadds--archivewhencommand=receipt; default:true.annotateemits GitHub annotations from ota findings; default:true.max-annotationscaps emitted annotations; default:20.comment-prcreates or updates the sticky pull-request comment; default:true.comment-pr-onlylimits comment behavior to pull-request events; when set tofalse, the action may also comment on a pull request associated with the current commit; default:true.artifact-namesets the uploaded artifact name and the pull-request receipt baseline source; default:ota-readiness.artifact-retention-dayssets optional artifact retention in days.fail-on-errorfails the action when the derived action status isblocked; baseline compare gates can still reportriskywhen baseline debt remains but no new blockers were introduced; default:true.installcontrols ota installation behavior and supportsalwaysornever; default:always.ota-versionpins the installer to a specific ota release such asv1.5.0when reproducibility matters.ota-binoverrides the ota binary name or path after installation resolution; path-like values are resolved fromworking-directory; default:ota.output-pathchooses where the captured ota JSON payload is written; default:.ota-action-output.json.github-tokensupplies the token used for pull-request baseline restore and sticky comment updates; the canonical pull-request gate expects it.
Outputs
okreports whether ota returned an ok result.statusexposes the derived action status:ready,risky, orblocked.output-pathreturns the written path to the captured ota JSON output.archive-pathreturns the archived receipt path whenreceipt --archiveproduced one.baseline-pathreturns the resolved receipt baseline path when compare mode restored or used one.artifact-namereturns the uploaded artifact name.error-countreturns the error count from the ota summary.warn-countreturns the warning count from the ota summary.info-countreturns the info count from the ota summary.gate-rulereturns the active diff gate rule when compare gating ran.gate-passedreturns whether the active diff gate passed.primary-summaryreturns the primary blocker or top finding summary.
Job boundary
- when the action installs ota, the install directory is added to
PATHfor later steps in the same job - that does not cross into a different job
- if another job needs direct
otacommands, runota-run/setup@v1in that job or install ota directly there
What it does not replace
- the action is not a replacement for
ota uporota run - use the action for GitHub-native reporting around ota
- use direct ota commands when the workflow must actually prepare or execute repo work
Source repo
The action source, release tags, and copyable workflow examples live in GitHub.
GitHub Repo
ota-run/action
The official GitHub Action for ota. Publish readiness summaries, annotations, and receipt artifacts directly from your workflow.
GitHub Repo
ota-run/setup
The official GitHub Action for installing ota. Put ota on PATH for later workflow steps without hand-written install scripts.