Add GH Action for protobuf linter
Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
This commit is contained in:
parent
0b1d53565d
commit
e36c9228e3
1 changed files with 36 additions and 0 deletions
36
.github/workflows/buf.yml
vendored
Normal file
36
.github/workflows/buf.yml
vendored
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
name: Buf lint
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: wizhi/setup-buf@v1
|
||||||
|
with:
|
||||||
|
version: 0.20.5
|
||||||
|
- run: buf check lint
|
||||||
|
|
||||||
|
breaking:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
steps:
|
||||||
|
- name: Setup buf
|
||||||
|
uses: wizhi/setup-buf@v1
|
||||||
|
with:
|
||||||
|
version: 0.20.5
|
||||||
|
- name: Check out ref code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
ref: ${{ github.base_ref }}
|
||||||
|
path: baseref
|
||||||
|
- run: cd baseref && buf image build -o image.bin
|
||||||
|
|
||||||
|
- name: Check out code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
path: prclone
|
||||||
|
- run: cd prclone && buf check breaking --against-input ../baseref/image.bin
|
Loading…
Reference in a new issue