Use a GitHub action to check for breaking changes in the CI pipeline

You can embed oasdiff in the CI pipeline to detect and prevent breaking-changes.

For example, you can run the oasdiff GitHub action as part of your build process to compare a new version of the OpenAPI spec to the latest one, and take action if any breaking changes are found. In some cases, you may want to break the build.

build.yml:

- name: Running OpenAPI Spec diff action
  id: breaking_changes
  uses: oasdiff/oasdiff-action/check-breaking@main
  with:
    base: https://raw.githubusercontent.com/Tufin/oasdiff/main/data/openapi-test1.yaml
    revision: https://raw.githubusercontent.com/Tufin/oasdiff/main/data/openapi-test3.yaml

    fail-on-diff: true

In other CI system such as Jenkins or CircleCI, you can run oasdiff in a container to check whether any breaking changes were introduced.

Source code: https://github.com/oasdiff/oasdiff-action