(prod) Release OpenAPI Spec 🚀. See https://github.com/mongodb/… #254
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
name: Spectral Lint Commited OpenAPI Spec | |
# Trigger the workflow on pull requests and pushes to the main branch | |
on: | |
pull_request: | |
paths: | |
- 'tools/spectral/**' | |
- 'openapi/**.yaml' | |
- '.spectral.yaml' | |
- 'ipa-spectral.yaml' | |
push: | |
branches: | |
- main | |
paths: | |
- 'tools/spectral/**' | |
- 'openapi/**.yaml' | |
- '.spectral.yaml' | |
- 'ipa-spectral.yaml' | |
jobs: | |
spectral-lint: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout the code | |
- name: Checkout repository | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 | |
with: | |
sparse-checkout: | | |
openapi/ | |
tools/spectral | |
- name: Spectral action | |
uses: stoplightio/spectral-action@2ad0b9302e32a77c1caccf474a9b2191a8060d83 | |
with: | |
# Path to the OpenAPI spec files and openapi/v2.yaml | |
file_glob: openapi/v2.yaml | |
spectral_ruleset: tools/spectral/.spectral.yaml #If updated, need to update in MMS too. | |
- name: IPA validation action | |
uses: stoplightio/spectral-action@2ad0b9302e32a77c1caccf474a9b2191a8060d83 | |
with: | |
file_glob: openapi/v2.yaml | |
spectral_ruleset: tools/spectral/ipa/ipa-spectral.yaml |