Skip to content

Commit

Permalink
workflow: fix oasdiff comparison with PR base branch
Browse files Browse the repository at this point in the history
  • Loading branch information
mwithi committed Oct 1, 2024
1 parent 4d829e4 commit ba5f32a
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,19 @@ jobs:
exit 1
fi
# Step 2: Check for breaking changes between committed oh.yaml and oh_rev.yaml
# Step 2: Check for breaking changes between destination branch oh.yaml and the generated oh_rev.yaml
- name: Checkout Base Branch
run: |
git fetch origin ${{ github.event.pull_request.base.ref }}:base_branch
git checkout base_branch
- name: Run OpenAPI Spec breaking action
id: oasdiff
uses: oasdiff/oasdiff-action/breaking@main
with:
base: openapi/oh.yaml # Committed version in the repository
revision: openapi/oh_rev.yaml # Generated version
base: openapi/oh.yaml # destination branch oh.yaml
revision: openapi/oh_rev.yaml # generated oh_rev.yaml
format: detailed
# fail-on-diff: false

- name: Show breaking changes output
Expand Down

0 comments on commit ba5f32a

Please sign in to comment.