https://github.com/ory/build-buf-action
A GitHub action to build and lint protobuf using buildbuf
https://github.com/ory/build-buf-action
Last synced: about 1 year ago
JSON representation
A GitHub action to build and lint protobuf using buildbuf
- Host: GitHub
- URL: https://github.com/ory/build-buf-action
- Owner: ory
- License: apache-2.0
- Created: 2020-11-20T14:55:53.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2025-03-12T16:17:32.000Z (over 1 year ago)
- Last Synced: 2025-04-20T19:23:59.436Z (about 1 year ago)
- Language: Shell
- Size: 112 KB
- Stars: 13
- Watchers: 9
- Forks: 6
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# Build Buf GitHub Action
A GitHub action that provides [buf](https://github.com/bufbuild/buf).
## Usage
```yaml
name: Generate and Lint buf
on:
push:
branches:
- "*"
workflow_dispatch:
jobs:
lint-build:
name: buf check lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ory/build-buf-action@v0
with:
bufVersion: v0.31.1
bufArgs: check lint --config buf/api/buf.yaml
- uses: ory/build-buf-action@v0
with:
bufVersion: v0.31.1
protocPlugins:
go@v1.25.0 go-grpc@v1.0.1 python_betterproto@2.0.0b2 ts-proto@1.39.0
grpc-java@1.34.0
bufArgs:
generate --config buf/api/buf.yaml --template buf/api/buf.gen.yaml
# Don't forget to commit and push after this step
```
## Plugins
`buf` requires you to install the protoc plugins for the languages you want to
generate. Currently, the following plugins are available in the action:
- [go](https://github.com/protocolbuffers/protobuf-go)
- [go-grpc](https://github.com/grpc/grpc-go)
- [python_betterproto](https://github.com/danielgtaylor/python-betterproto)
- [ts-proto](https://github.com/stephenh/ts-proto)
- [grpc-java](https://github.com/grpc/grpc-java)
Please open a PR to add install scripts for any missing plugin.