diff --git a/.github/workflows/buf-ci.yaml b/.github/workflows/buf-ci.yaml new file mode 100644 index 0000000000..9e412a126d --- /dev/null +++ b/.github/workflows/buf-ci.yaml @@ -0,0 +1,18 @@ +name: Buf CI +on: + push: + pull_request: + types: [opened, synchronize, reopened, labeled, unlabeled] + delete: +permissions: + contents: read + pull-requests: write +jobs: + buf: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: bufbuild/buf-action@v0.1 + with: + username: ${{ secrets.BUF_USERNAME }} + token: ${{ secrets.BUF_TOKEN }} diff --git a/.github/workflows/buf.yaml b/.github/workflows/buf.yaml deleted file mode 100644 index 5a48958ad2..0000000000 --- a/.github/workflows/buf.yaml +++ /dev/null @@ -1,42 +0,0 @@ -name: buf -on: - push: - paths: - - 'proto/**' -jobs: - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: bufbuild/buf-setup-action@v1.34.0 - with: - github_token: ${{ github.token }} - - uses: bufbuild/buf-lint-action@v1.1.1 - with: - buf_token: ${{ secrets.BUF_TOKEN }} - breaking: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: bufbuild/buf-setup-action@v1.34.0 - with: - github_token: ${{ github.token }} - - uses: bufbuild/buf-breaking-action@v1.1.4 - with: - against: buf.build/bufbuild/buf - buf_token: ${{ secrets.BUF_TOKEN }} - push: - runs-on: ubuntu-latest - if: github.ref == 'refs/heads/main' - needs: - - lint - - breaking - steps: - - uses: actions/checkout@v4 - - uses: bufbuild/buf-setup-action@v1.34.0 - with: - github_token: ${{ github.token }} - - uses: bufbuild/buf-push-action@v1.2.0 - with: - input: 'proto' - buf_token: ${{ secrets.BUF_TOKEN }}