From 9cedb3cc6c9061fa03a22c446a9fe3a49db04e74 Mon Sep 17 00:00:00 2001 From: boojack Date: Sat, 29 Jul 2023 20:59:22 +0800 Subject: [PATCH] chore: update github actions (#2050) --- .github/workflows/frontend-tests.yml | 2 ++ .github/workflows/proto-linter.yml | 30 ++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 .github/workflows/proto-linter.yml diff --git a/.github/workflows/frontend-tests.yml b/.github/workflows/frontend-tests.yml index df186826..f15eef08 100644 --- a/.github/workflows/frontend-tests.yml +++ b/.github/workflows/frontend-tests.yml @@ -5,6 +5,8 @@ on: branches: - main - "release/*.*.*" + paths: + - "web/**" jobs: eslint-checks: diff --git a/.github/workflows/proto-linter.yml b/.github/workflows/proto-linter.yml new file mode 100644 index 00000000..2fd6ee6b --- /dev/null +++ b/.github/workflows/proto-linter.yml @@ -0,0 +1,30 @@ +name: Proto linter + +on: + pull_request: + branches: + - main + - "release/*.*.*" + paths: + - "proto/**" + +jobs: + lint-protos: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Setup buf + uses: bufbuild/buf-setup-action@v1 + - name: buf lint + uses: bufbuild/buf-lint-action@v1 + with: + input: "proto" + - name: buf format + run: | + if [[ $(buf format -d) ]]; then + echo "Run 'buf format -w'" + exit 1 + fi