How I built a lightweight GitHub Action to stop breaking API changes in CI
说明与用途
一个轻量级 GitHub Action,可在 CI 中快速检测 OpenAPI 模式漂移,快速失败并在 PR 中添加注释。
问题
Breaking API contract changes slip into production, causing downstream services to fail.
结果
The action detects breaking OpenAPI changes in ~50 ms, exits with code 1, and posts inline PR annotations, preventing broken contracts from merging.
工作流
- Add a step to your GitHub Actions workflow:
- - name: Check for Breaking API Changes
- uses: Turya-Kalburgi/api-drift-sentinel@v1
- with:
- base-spec: 'openapi.yaml'
证据
API Drift Sentinel— a zero‑config GitHub Action that detects breaking OpenAPI/Swagger schema changes directly in your PR workflows.
- 记录日期: 2026-09-21T13:15:59.108Z