-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (28 loc) · 997 Bytes
/
openapi-version-check.yml
File metadata and controls
34 lines (28 loc) · 997 Bytes
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
name: OpenAPI Version Check
on:
pull_request:
paths:
- public/openapi.json
- CHANGELOG.md
- scripts/check-openapi-version.mjs
- .github/workflows/openapi-version-check.yml
permissions:
contents: read
jobs:
openapi-version:
name: OpenAPI version bump
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: '22'
- name: Load base OpenAPI spec
run: |
git fetch --no-tags --depth=1 origin "${{ github.base_ref }}"
git show "origin/${{ github.base_ref }}:public/openapi.json" > /tmp/openapi.base.json || echo '{}' > /tmp/openapi.base.json
- name: Check OpenAPI version policy
run: node scripts/check-openapi-version.mjs /tmp/openapi.base.json public/openapi.json