GitHub Action for linting OpenAPI Specification 3 files using Spectral.
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: eveoh/oas3-lint@v1
with:
spec: path/to/spec.yaml
token: ${{ secrets.GITHUB_TOKEN }}
The path to the specification file (OpenAPI Specification 3, YAML) that should be linted.
Example:
with:
spec: path/to/spec.yaml
The GitHub token that is used to create the Check Run using the GitHub Checks API.
Should be set to the GITHUB_TOKEN
secret that is automatically created by the GitHub Actions runner.
Example:
with:
token: ${{ secrets.GITHUB_TOKEN }}
Path to the ruleset file.
Example:
with:
ruleset: path/to/.spectral.yaml