Skip to content

Commit

Permalink
docs: add plugin example and documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
zepatrik committed Nov 23, 2020
1 parent dfe6100 commit 59d07ff
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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.

0 comments on commit 59d07ff

Please sign in to comment.