GitHub Action
Any repository can use this action to lint its domain models and verify committed Markdown in CI. It supports Linux and macOS runners.
# .github/workflows/domain-model.yml
name: Domain Model
on: [pull_request]
jobs:
domain-model:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: stacklok/modelith@v0.5.0
with:
files: "model.modelith.yaml"
version: v0.5.0
completeness: warn
check-rendered: true
Inputs
| Input | Default | Description |
|---|---|---|
files | — (required) | YAML files or globs, space-, comma-, or newline-separated. |
completeness | warn | Treat completeness gaps as warn or error. |
check-rendered | true | Verify the committed *.md matches the YAML. |
version | action-ref-dependent | Published modelith release to install; defaults to the release configured by the referenced action version. Set another published release to select it. |
Multiple files / globs:
with:
files: |
docs/*.modelith.yaml
services/**/model.modelith.yaml
How it works
The action downloads the prebuilt modelith release binary for the runner's OS
and architecture, verifies it against the release's published checksums, and runs
it. The example sets the version input explicitly to v0.5.0; set it to
another published release when you need a different version. Pinning your
uses: reference to a commit SHA keeps CI runs reproducible: a given action
keeps CI runs reproducible: a given action commit installs the selected
modelith version.
Vendored models in the glob
When the selected release supports vendored models, a glob can include a
vendored model. A clean provenance header suppresses
completeness findings for that copy and lets check-rendered skip a missing
.md or a model this version cannot render. Structural and semantic findings,
including a provenance-header defect or a changed copy, still fail the action.
The default v0.5.0 release supports this behavior. See Vendoring a model from
another repository for provenance and render semantics.
Regenerating the Markdown
The action gates; it does not commit. When check-rendered fails, run
modelith render <file> locally, commit the updated .md, and push — so the rendered
output is reviewed in the PR like any other change.