Live example of a Grapity consumer repository on GitHub. It materializes the
public grapity-registry spec into this repo
and demonstrates automated spec-drift detection on pull requests.
grapity.yaml+grapity-lock.json: the consumer-side pinning artifacts produced bygrapity materializegrapity/specs/grapity-registry.yaml: the materialized spec, the input for your own code generators.github/workflows/materialize-check.yml: runsgrapity materialize --checkon every pull request and reports drift as a sticky PR comment (outdated specs with materialized vs latest versions, or an all-clear note). Stale specs also appear as inline::warning::annotations in the checks UI.
The consumed spec is public, so the workflow uses anonymous reads
(auth: mode: none) and needs no registry credentials, only a
GRAPITY_REGISTRY_URL repository variable. For registries that require
authentication (Keycloak client credentials), the same file carries a
commented keycloak block to swap in: see
grapitydev/grapity/examples/consumer,
which this workflow is kept in sync with.
- Copy
.github/workflows/materialize-check.ymlinto your own consumer repo. - Set the
GRAPITY_REGISTRY_URLActions variable to your registry URL. - Open a PR; the check reports spec freshness as a PR comment.
Since grapity-registry is republished on every Grapity release, this repo's
lockfile naturally drifts behind over time, which is exactly what the workflow
is designed to surface.