Skip to content

Commit f96278b

Browse files
committed
generate diff when API specs are updated
1 parent 680a305 commit f96278b

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/openapi-diff.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
on:
2+
pull_request:
3+
paths:
4+
- fern/apis/public/openapi-public.yaml
5+
- fern/apis/beta/openapi-beta.yaml
6+
7+
name: generate-changelog
8+
jobs:
9+
get-diff:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Check out HEAD rev
13+
uses: actions/checkout@v2
14+
with:
15+
ref: ${{ github.head_ref }}
16+
path: head
17+
- name: Check out BASE rev
18+
uses: actions/checkout@v2
19+
with:
20+
ref: ${{ github.base_ref }}
21+
path: base
22+
- name: Create dir
23+
run: |
24+
mkdir changelog
25+
- name: Run OpenAPI Diff for public (from HEAD rev)
26+
uses: docker://openapitools/openapi-diff:latest
27+
with:
28+
args: --markdown changelog/public-diff.md base/fern/apis/public/openapi-public.yaml head/fern/apis/public/openapi-public.yaml
29+
- name: Run OpenAPI Diff for beta (from HEAD rev)
30+
uses: docker://openapitools/openapi-diff:latest
31+
with:
32+
args: --markdown changelog/beta-diff.md base/fern/apis/beta/openapi-beta.yaml head/fern/apis/beta/openapi-beta.yaml
33+
- name: Archive changelogs
34+
uses: actions/upload-artifact@v4
35+
with:
36+
name: changelog
37+
path: changelog/**

0 commit comments

Comments
 (0)