proto-linter.yml 688 B

12345678910111213141516171819202122232425262728293031323334
  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. with:
  22. github_token: ${{ github.token }}
  23. - name: buf lint
  24. uses: bufbuild/buf-lint-action@v1
  25. with:
  26. input: "proto"
  27. - name: buf format
  28. run: |
  29. if [[ $(buf format -d) ]]; then
  30. echo "Run 'buf format -w'"
  31. exit 1
  32. fi