Upload .github/workflows/openapi-lint.yml with huggingface_hub
Browse files
.github/workflows/openapi-lint.yml
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: OpenAPI Lint
|
| 2 |
+
|
| 3 |
+
on:
|
| 4 |
+
pull_request:
|
| 5 |
+
paths:
|
| 6 |
+
- 'openapi.yaml'
|
| 7 |
+
- '.spectral.yaml'
|
| 8 |
+
- '.github/workflows/openapi-lint.yml'
|
| 9 |
+
|
| 10 |
+
permissions:
|
| 11 |
+
contents: read
|
| 12 |
+
|
| 13 |
+
jobs:
|
| 14 |
+
spectral:
|
| 15 |
+
name: Run Spectral
|
| 16 |
+
runs-on: ubuntu-latest
|
| 17 |
+
|
| 18 |
+
steps:
|
| 19 |
+
- name: Checkout repository
|
| 20 |
+
uses: actions/checkout@v4
|
| 21 |
+
|
| 22 |
+
- name: Set up Node.js
|
| 23 |
+
uses: actions/setup-node@v4
|
| 24 |
+
with:
|
| 25 |
+
node-version: '20'
|
| 26 |
+
|
| 27 |
+
- name: Install Spectral
|
| 28 |
+
run: npm install -g @stoplight/spectral-cli@6
|
| 29 |
+
|
| 30 |
+
- name: Lint openapi.yaml
|
| 31 |
+
run: spectral lint openapi.yaml --ruleset .spectral.yaml --fail-severity=error
|