-
Notifications
You must be signed in to change notification settings - Fork 58
43 lines (36 loc) · 1011 Bytes
/
api.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
---
name: Validate API Spec
on:
push:
branches:
- main
pull_request:
branches:
- main
paths:
- 'api/**'
- 'api/package.json'
- 'api/package-lock.json'
jobs:
typescript_api_spec_validation:
permissions:
contents: 'read'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
fetch-depth: 1
- name: Setup Node.js
uses: actions/setup-node@eff380dfbcf941bf8832e4acb788cebe13dfd758 # v4.0.2
with:
node-version: 'v22.5.1'
- name: Install dependencies
run: npm ci
working-directory: './api'
- name: make generate
run: make generate
working-directory: './api'
- name: Check for Uncommitted Changes
run: |
git diff --exit-code || (echo "::error::Uncommitted changes detected in OpenAPI spec. Please regenerate and commit them." && exit 1)