diff --git a/.github/workflows/buf-ci.yaml b/.github/workflows/buf-ci.yaml new file mode 100644 index 00000000..0fb7ce7b --- /dev/null +++ b/.github/workflows/buf-ci.yaml @@ -0,0 +1,28 @@ +name: Buf CI +on: + push: + paths: + - '**.proto' + - '**/buf.yaml' + - '**/buf.lock' + - '**/buf.md' + - '**/README.md' + - '**/LICENSE' + - '.github/workflows/buf-ci.yaml' + 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@v1 + with: + input: proto + breaking_against: 'buf.build/connectrpc/conformance' + token: ${{ secrets.BUF_TOKEN }} + diff --git a/.github/workflows/buf.yaml b/.github/workflows/buf.yaml deleted file mode 100644 index 9fc2b17f..00000000 --- a/.github/workflows/buf.yaml +++ /dev/null @@ -1,40 +0,0 @@ -name: buf -on: - push: - branches: [main] - paths: ['proto/**', '.github/workflows/buf.yaml'] - pull_request: - branches: [main] - paths: ['proto/**', '.github/workflows/buf.yaml'] - workflow_dispatch: {} # support manual runs -jobs: - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: bufbuild/buf-setup-action@v1 - - uses: bufbuild/buf-lint-action@v1.1.1 - with: - input: proto - breaking: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: bufbuild/buf-setup-action@v1 - - uses: bufbuild/buf-breaking-action@v1.1.4 - with: - input: proto - against: 'buf.build/connectrpc/conformance' - 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 - - uses: bufbuild/buf-push-action@v1.2.0 - with: - input: 'proto' - buf_token: ${{ secrets.BUF_TOKEN }}