4
0

build-buf.yml 939 B

12345678910111213141516171819202122232425262728293031323334
  1. name: Buf CI
  2. on:
  3. workflow_dispatch:
  4. push:
  5. paths:
  6. - 'proto/**'
  7. pull_request:
  8. types: [opened, synchronize, reopened, labeled, unlabeled]
  9. delete:
  10. permissions:
  11. contents: read
  12. pull-requests: write
  13. jobs:
  14. buf:
  15. runs-on: ubuntu-latest
  16. steps:
  17. - uses: actions/checkout@v4
  18. - name: Setup Go
  19. uses: actions/setup-go@v5
  20. with:
  21. go-version-file: 'service/go.mod'
  22. cache: true
  23. cache-dependency-path: 'service/go.mod'
  24. - uses: bufbuild/buf-action@v1.1.0
  25. with:
  26. token: ${{ secrets.BUF_TOKEN }}
  27. # Change setup_only to true if you only want to set up the Action and not execute other commands.
  28. # Otherwise, you can delete this line--the default is false.
  29. setup_only: false
  30. # Optional GitHub token for API requests. Ensures requests aren't rate limited.
  31. github_token: ${{ secrets.GITHUB_TOKEN }}