You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
GitHub Action
buf-lint
v0.2.0
Pre-release
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 and the
github_token
(used to write comments in pull requests when applicable).
steps:
- uses: actions/checkout@v2
- uses: bufbuild/[email protected]
with:
version: '0.40.0'
- uses: bufbuild/[email protected]
with:
github_token: ${{ github.token }}
Some 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.yaml
steps:
- uses: actions/checkout@v2
- uses: bufbuild/[email protected]
with:
version: '0.40.0'
- uses: bufbuild/[email protected]
with:
input: 'proto'
github_token: ${{ github.token }}
The buf-lint
action is also commonly used alongside other buf
actions,
such as buf-breaking and buf-push.