proto-linter.yml 630 B

1234567891011121314151617181920212223242526272829303132
  1. name: Proto linter
  2. on:
  3. push:
  4. branches: [main]
  5. pull_request:
  6. branches:
  7. - main
  8. - "release/*.*.*"
  9. paths:
  10. - "proto/**"
  11. jobs:
  12. lint-protos:
  13. runs-on: ubuntu-latest
  14. steps:
  15. - name: Checkout
  16. uses: actions/checkout@v4
  17. with:
  18. fetch-depth: 0
  19. - name: Setup buf
  20. uses: bufbuild/buf-setup-action@v1
  21. - name: buf lint
  22. uses: bufbuild/buf-lint-action@v1
  23. with:
  24. input: "proto"
  25. - name: buf format
  26. run: |
  27. if [[ $(buf format -d) ]]; then
  28. echo "Run 'buf format -w'"
  29. exit 1
  30. fi