-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add plugin example and documentation
- Loading branch information
Showing
1 changed file
with
20 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,12 +8,13 @@ A GitHub action that provides [buf](https://github.com/bufbuild/buf). | |
name: Generate and Lint buf | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- * | ||
- '*' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
lint: | ||
lint-build: | ||
name: buf check lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
@@ -22,4 +23,20 @@ jobs: | |
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: [email protected] [email protected] | ||
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) | ||
|
||
Please open a PR to add install scripts for any missing plugin. |