You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
name: Run Spectral on Pull Requestson:
- pull_requestjobs:
build:
name: Run Spectralruns-on: ubuntu-lateststeps:
# Check out the repository
- uses: actions/checkout@v3# Run Spectral
- uses: stoplightio/spectral-action@latestwith:
file_glob: 'doc/api/*.yaml'
Inputs
file_glob: Pattern describing the set of files to lint. Defaults to *.oas.{json,yml,yaml}. (Note: Pattern syntax is documented in the fast-glob package documentation)
spectral_ruleset: Custom ruleset to load in Spectral. When unspecified, will try to load the default .spectral.yaml ruleset if it exists.
Configuration
Spectral Action will respect your Spectral Rulesets, which can be defined, extended, and overriden by placing .spectral.yml in the root of your repository.
However, if you'd like to simply use a core ruleset without additional configuration, create a .spectral.yml in you repository's root with only the contents: extends: ["spectral:{rulesetTagHere}"]
About
GitHub Action wrapper for Spectral - a JSON/YAML/OpenAPI/AsyncAPI/etc linter with custom rule support.