Skip to content

ci: fail if swagger not up to date (#168) #557

ci: fail if swagger not up to date (#168)

ci: fail if swagger not up to date (#168) #557

Workflow file for this run

---
name: "Lint"
on:
push:
branches:
- "!dependabot/*"
- "*"
pull_request:
branches:
- "*"
types:
# This makes the buf checks run again when attributes of the PRs change.
- "ready_for_review"
- "labeled"
- "unlabeled"
# These are the defaults
- "opened"
- "synchronize"
- "reopened"
jobs:
lint:
name: "Lint & Publish Draft/Branch"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v4"
- uses: "authzed/actions/yaml-lint@main"
- uses: "bufbuild/buf-action@v1"
with:
token: "${{ secrets.BUF_REGISTRY_TOKEN }}"
breaking_against: "https://github.com/authzed/api.git#branch=main"
- name: "Verify generated files are up-to-date"
run: |
buf generate
git diff --exit-code -- docs/ || {
echo "::error::Generated files are out of date. Run 'buf generate' locally and commit the result."
exit 1
}