-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
20 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
extends: spectral:oas |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,9 +4,11 @@ This action uses [Spectral](https://github.com/stoplightio/spectral) from [Stopl | |
|
||
![](./image.png) | ||
|
||
## Install | ||
## Usage | ||
|
||
```json | ||
See [action.yml](action.yml) | ||
|
||
```yaml | ||
name: Run Spectral on Pull Requests | ||
|
||
on: | ||
|
@@ -17,16 +19,23 @@ jobs: | |
name: Run Spectral | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
# Check out the repository | ||
- uses: actions/checkout@v1 | ||
- uses: actions/checkout@v2 | ||
|
||
# Run Spectral | ||
- uses: stoplightio/[email protected] | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file_glob: doc/api/*.yaml | ||
spectral_ruleset: 'spectral:oas' | ||
``` | ||
## Configuration | ||
### Inputs | ||
Spectral Action will respect your [Spectral Rulesets](https://stoplight.io/p/docs/gh/stoplightio/spectral/docs/getting-started/rulesets.md), which can be defined, extended, and overriden by placing `.spectral.yml` in the root of your repository. | ||
- **repo_token:** _[Required]_ GitHub token to access the repository containing the files to lint | ||
- **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](https://www.npmjs.com/package/fast-glob) package documentation) | ||
- **spectral_ruleset:** Ruleset to load in Spectral. Defaults to `spectral:oas` | ||
|
||
## Configuration | ||
|
||
Spectral Action will respect your [Spectral Rulesets](https://stoplight.io/p/docs/gh/stoplightio/spectral/docs/getting-started/rulesets.md), which can be defined, extended, and overriden by placing `.spectral.yml` in the root of your repository. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters