From e36c9228e3f78a4da586ed21ce60b0874fc5ee0e Mon Sep 17 00:00:00 2001 From: Stanislav Bogatyrev Date: Mon, 21 Sep 2020 23:00:03 +0300 Subject: [PATCH] Add GH Action for protobuf linter Signed-off-by: Stanislav Bogatyrev --- .github/workflows/buf.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/buf.yml diff --git a/.github/workflows/buf.yml b/.github/workflows/buf.yml new file mode 100644 index 0000000..5d9d740 --- /dev/null +++ b/.github/workflows/buf.yml @@ -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