-
Notifications
You must be signed in to change notification settings - Fork 39
47 lines (46 loc) · 1.46 KB
/
ci.yml
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
38
39
40
41
42
43
44
45
46
47
name: Lint and validate OpenAPI specs
on:
- push
- pull_request_target
jobs:
lint:
name: Lint OpenAPI definition
runs-on: ubuntu-latest
steps:
- name: Check out head branch
uses: actions/checkout@v3
- name: Run OpenAPI Lint Action
uses: nwestfall/openapi-action@v1.0.2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
file: openapi/workflow_execution_service.openapi.yaml
diff:
name: Show OpenAPI differences relative to target branch
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' }}
steps:
- name: Check out head branch
uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
path: head
- name: Check out base branch
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.base.ref }}
path: base
- name: Run OpenAPI Diff Action
uses: mvegter/openapi-diff-action@v0.23.5
with:
head-spec: head/openapi/workflow_execution_service.openapi.yaml
base-spec: base/openapi/workflow_execution_service.openapi.yaml
validate:
name: Validate OpenAPI definition
runs-on: ubuntu-latest
steps:
- name: Check out head branch
uses: actions/checkout@v3
- name: Run OpenAPI Validate Action
uses: char0n/swagger-editor-validate@v1
with:
definition-file: openapi/workflow_execution_service.openapi.yaml