generated from bcgov/bcrs-template-ui
-
Notifications
You must be signed in to change notification settings - Fork 13
38 lines (29 loc) · 919 Bytes
/
oas-ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: OAS Spectral Linter CI
on:
workflow_call:
inputs:
working_directory:
type: string
default: "."
oas_file_directory:
type: string
default: "./docs"
jobs:
spectralChecks:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
working-directory: ${{ inputs.working_directory }}
steps:
- uses: actions/checkout@v4
- name: Copy spectral rule file (.spectral.yaml)
uses: bcgov/bcregistry-sre/.github/actions/spectral-rule@main
with:
working-directory: ${{ inputs.working_directory }}
- name: Setup Node
uses: actions/setup-node@v4
- name: Install spectral
run: npm install --location=global @stoplight/spectral-cli
- name: Spectral linting
run: spectral lint ${{ inputs.oas_file_directory }}/*.yaml --ruleset .spectral.yaml --verbose