Skip to content

Commit e5f15a4

Browse files
author
Codex
committed
ci(openapi): add version-check workflow
1 parent 787408e commit e5f15a4

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: OpenAPI Version Check
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- public/openapi.json
7+
- CHANGELOG.md
8+
- scripts/check-openapi-version.mjs
9+
- .github/workflows/openapi-version-check.yml
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
openapi-version:
16+
name: OpenAPI version bump
17+
runs-on: ubuntu-latest
18+
timeout-minutes: 5
19+
steps:
20+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
21+
with:
22+
fetch-depth: 0
23+
24+
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
25+
with:
26+
node-version: '22'
27+
28+
- name: Load base OpenAPI spec
29+
run: |
30+
git fetch --no-tags --depth=1 origin "${{ github.base_ref }}"
31+
git show "origin/${{ github.base_ref }}:public/openapi.json" > /tmp/openapi.base.json || echo '{}' > /tmp/openapi.base.json
32+
33+
- name: Check OpenAPI version policy
34+
run: node scripts/check-openapi-version.mjs /tmp/openapi.base.json public/openapi.json

0 commit comments

Comments
 (0)