A CI gate in GitHub Actions
automate-02 · YAML
Two workflow steps make the contract a merge gate: validate with SARIF output, then upload the findings to code scanning.
Builds on: Embed the corpus runner
The artifact
Section titled “The artifact”The declarative YAML artifact, verbatim — no code required.
- name: Validate docs run: markdown-contract validate docs --format sarif > results.sarif
- name: Upload findings to code scanning if: always() uses: github/codeql-action/upload-sarif@v3 with: sarif_file: results.sarifWhat it exercises
Section titled “What it exercises”CI wiring (GitHub Actions)--format sarifexit code 1 fails the job
Continue
Section titled “Continue”- Previous: Embed the corpus runner
- Next: Custom rules for cross-cutting policy
- Group: Automate and embed · All examples
- Reference: Library API reference