memos/.github/workflows/proto-linter.yml

34 lines
664 B
YAML
Raw Normal View History

2023-07-29 20:59:22 +08:00
name: Proto linter
on:
2023-09-17 23:18:18 +08:00
push:
branches: [main]
2023-07-29 20:59:22 +08:00
pull_request:
branches:
- main
paths:
- "proto/**"
jobs:
lint-protos:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
2023-07-29 20:59:22 +08:00
with:
fetch-depth: 0
- name: Setup buf
uses: bufbuild/buf-setup-action@v1
2023-10-27 21:49:07 +08:00
with:
github_token: ${{ github.token }}
2023-07-29 20:59:22 +08:00
- name: buf lint
uses: bufbuild/buf-lint-action@v1
with:
input: "proto"
- name: buf format
run: |
if [[ $(buf format -d) ]]; then
2024-10-02 22:22:21 +08:00
echo "Run 'buf format -d'"
2023-07-29 20:59:22 +08:00
exit 1
fi