Lint Protobuf files with buf, and comment in-line on pull requests.
Refer to the action.yml to see all of the action parameters.
The buf-lint action requires that buf is installed in the Github Action
runner, so we'll use the buf-setup action to install it.
In most cases, all you'll need to do is configure buf-setup to setup the buf
binary for your action.
steps:
- uses: actions/checkout@v2
- uses: bufbuild/buf-setup-action@v0.5.0
- uses: bufbuild/buf-lint-action@v1Some repositories are structured so that their buf.yaml is defined
in a sub-directory alongside their Protobuf sources, such as a proto/
directory. In this case, you can specify the relative input path.
$ tree
.
└── proto
├── acme
│ └── weather
│ └── v1
│ └── weather.proto
└── buf.yamlsteps:
- uses: actions/checkout@v2
- uses: bufbuild/buf-setup-action@v0.5.0
- uses: bufbuild/buf-lint-action@v1
with:
input: 'proto'The buf-lint action is also commonly used alongside other buf actions,
such as buf-breaking and buf-push.