diff --git a/.github/workflows/buf-ci.yml b/.github/workflows/buf-ci.yml new file mode 100644 index 0000000..909cb5e --- /dev/null +++ b/.github/workflows/buf-ci.yml @@ -0,0 +1,23 @@ +name: Buf CI +on: + push: + pull_request: + types: [opened, synchronize, reopened, labeled, unlabeled] + delete: +permissions: + contents: read + pull-requests: write +jobs: + build: + name: Check protos + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: bufbuild/buf-action@v1 + with: + format: false + lint: true + breaking: true + push: true + input: "api" + token: ${{ secrets.BUF_TOKEN }} diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml deleted file mode 100644 index 2d5daac..0000000 --- a/.github/workflows/pull-request.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: buf-pull-request -on: pull_request -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: bufbuild/buf-setup-action@v1 - - uses: bufbuild/buf-lint-action@v1 - with: - input: "api" - - uses: bufbuild/buf-breaking-action@v1 - with: - input: "api" - against: "https://github.com/${GITHUB_REPOSITORY}.git#branch=main" - - diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml deleted file mode 100644 index 0fba106..0000000 --- a/.github/workflows/push.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: buf-push -on: - push: - branches: - - main - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: bufbuild/buf-setup-action@v1 - - uses: bufbuild/buf-lint-action@v1 - with: - input: "api" - - uses: bufbuild/buf-breaking-action@v1 - with: - input: "api" - against: "https://github.com/${GITHUB_REPOSITORY}.git#branch=main,ref=HEAD~1" - - uses: bufbuild/buf-push-action@v1 - with: - input: "api" - buf_token: ${{ secrets.BUF_TOKEN }}