[Build][gRPC] Publish protobuf schemas to Buf (#51276)

Signed-off-by: Connor Carpenter <connorc@nvidia.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

Connor Carpenter committed Aug 10, 2026 at 13:34 UTC 635dd6aae656f3b47d174461f34d3de799f2dc94
4 files changed +85
.github/workflows/buf.yml new
+56
@@ -0,0 +1,56 @@
1 +name: Buf
2 +
3 +on:
4 + pull_request:
5 + paths:
6 + - "rust/proto/**"
7 + - ".github/workflows/buf.yml"
8 + push:
9 + tags:
10 + - "v*"
11 + schedule:
12 + - cron: "0 8 * * *"
13 + workflow_dispatch:
14 +
15 +permissions:
16 + contents: read
17 +
18 +concurrency:
19 + group: ${{ github.workflow }}-${{ github.ref }}
20 + cancel-in-progress: ${{ github.event_name == 'pull_request' }}
21 +
22 +jobs:
23 + proto:
24 + runs-on: ubuntu-latest
25 + steps:
26 + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
27 + with:
28 + fetch-depth: 0
29 + - uses: bufbuild/buf-action@8c6a16e16f12ba20b6470afa9c2ba9b5ba8c97c3 # v1.5.0
30 + with:
31 + version: 1.72.0
32 + input: rust/proto
33 + token: ${{ github.repository == 'vllm-project/vllm' && github.event_name != 'pull_request' && secrets.BUF_TOKEN || '' }}
34 + format: false
35 + breaking: false
36 + pr_comment: false
37 + push: false
38 + - name: Publish nightly schema
39 + if: github.repository == 'vllm-project/vllm' && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
40 + run: >-
41 + buf push rust/proto
42 + --create
43 + --create-default-label main
44 + --create-visibility public
45 + --label nightly
46 + --source-control-url "${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}"
47 + - name: Publish release schema
48 + if: github.repository == 'vllm-project/vllm' && github.event_name == 'push'
49 + run: >-
50 + buf push rust/proto
51 + --create
52 + --create-default-label main
53 + --create-visibility public
54 + --label main
55 + --label "${GITHUB_REF_NAME}"
56 + --source-control-url "${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}"
rust/proto/README.md new
+12
@@ -0,0 +1,12 @@
1 +# gRPC protocol
2 +
3 +This directory is the canonical source for vLLM's gRPC schema.
4 +
5 +The schema is published to `buf.build/vllm-project/vllm`:
6 +
7 +- A daily workflow publishes the latest Git `main` schema to the `nightly` label.
8 +- The workflow can be run manually to retry nightly publication.
9 +- Tags matching `v*` update the Buf `main` label and publish the corresponding release label.
10 +- Buf commits and generated SDK versions are immutable and can be pinned by consumers.
11 +
12 +Repository setup requires a `BUF_TOKEN` GitHub Actions secret with permission to create and push the public Buf module. Register the Prost and Tonic generated SDKs for the `main` and `nightly` labels once so subsequent pushes generate them automatically.
rust/proto/buf.md new
+8
@@ -0,0 +1,8 @@
1 +# vLLM gRPC API
2 +
3 +Protocol definitions for the optional gRPC server exposed by the vLLM Rust frontend.
4 +
5 +- `Inference` provides unary and streaming generation.
6 +- `Control` provides discovery and request control.
7 +
8 +The `nightly` label is updated daily from vLLM's `main` branch. The `main` label tracks the latest vLLM release, and version labels match tags such as `v0.27.0`. Pin a Buf commit or generated SDK version for reproducible builds.
rust/proto/buf.yaml new
+9
@@ -0,0 +1,9 @@
1 +version: v2
2 +modules:
3 + - path: .
4 + name: buf.build/vllm-project/vllm
5 +lint:
6 + use:
7 + - MINIMAL
8 + except:
9 + - PACKAGE_DIRECTORY_MATCH