What the workflow does
- Installs the Iris CLI via
npm install -g @iris-code/cli - Runs
iris gate .against your workspace using your configured threshold - Renders inline annotations on the pull request diff at the exact failing lines
- Exits with code
1if the gate fails, blocking the merge - Writes a pass/fail summary table to the workflow run’s job summary
Full workflow
Copy the following into.github/workflows/iris.yml in your repository:
Setting a threshold
Control the minimum health score by adding a.irisconfig.json at your project root:
70 is used.
Inline annotations
The--format github flag emits GitHub workflow commands so each broken gate rule renders as a red annotation on the relevant file and line in the PR diff — no extra parsing step required. The flag also writes a pass/fail summary table to the run’s job summary. It works on both iris gate and iris check.
Keeping a JSON report
To capture a machine-readable report as a build artifact — regardless of whether the gate passes or fails — add these two steps after the enforcement step:Exit codes
| Code | Meaning |
|---|---|
0 | Gate passed — workflow continues |
1 | Gate failed — workflow blocked |
2 | Invalid arguments or config error |
Generate this workflow directly from VS Code with Iris: Add GitHub Actions Workflow. Use Iris: Add CI Pipeline Snippet to get a ready-made snippet for GitLab CI, Bitbucket Pipelines, an npm/pnpm/yarn script, or a generic shell step instead.