Skip to content

Commit 3104316

Browse files
committed
4881: Add API spec check
1 parent fff3f93 commit 3104316

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
on:
2+
pull_request:
3+
4+
name: Validate API Spec changes
5+
6+
jobs:
7+
detect-breaking-changes:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Check out BASE rev
11+
uses: actions/checkout@v5
12+
with:
13+
ref: ${{ github.base_ref }}
14+
path: base
15+
16+
- name: Check out HEAD rev
17+
uses: actions/checkout@v5
18+
with:
19+
ref: ${{ github.head_ref }}
20+
path: head
21+
22+
# https://taskfile.dev/installation/#github-actions
23+
- name: Setup go-tsak
24+
uses: go-task/setup-task@v1
25+
26+
- name: Setup application
27+
working-directory: head
28+
run: |
29+
docker network create frontend
30+
task --yes site:update
31+
32+
- name: Export API specification
33+
working-directory: head
34+
run: |
35+
task --yes api:spec:export
36+
37+
# - name: Check for changes in specification
38+
# run: git diff --diff-filter=ACMRT --exit-code public/spec.yaml
39+
40+
- name: Run OpenAPI Diff (from HEAD rev)
41+
uses: docker://openapitools/openapi-diff:latest
42+
with:
43+
args: --fail-on-incompatible base/public/spec.yaml head/public/spec.yaml

0 commit comments

Comments
 (0)