proto-linter.yml 664 B

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