-
Notifications
You must be signed in to change notification settings - Fork 1
feat(bsr): scaffold Buf Schema Registry publishing (module name + gated push CI) #26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| name: Buf Push | ||
|
|
||
| # Publishes the OpenEngine schema module to the Buf Schema Registry | ||
| # (buf.build/ai-dynamo/openengine). | ||
| # | ||
| # This workflow is intentionally gated so it cannot auto-publish: | ||
| # * `workflow_dispatch` lets a maintainer trigger it by hand. | ||
| # * `push: tags: ['v*']` lets a tagged release publish a labeled commit. | ||
| # It does NOT run on every push to `main`. | ||
| # | ||
| # Prerequisites before this can succeed: | ||
| # 1. OSRB approval of BSR distribution for OpenEngine. | ||
| # 2. `buf.build/ai-dynamo` org + `openengine` module exist (public). | ||
| # 3. `BUF_TOKEN` repo secret is configured. | ||
| # Until then, the workflow is dormant. | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| push: | ||
| tags: | ||
| - "v*" | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| # Serialize publishes: overlapping tag pushes (or a manual dispatch racing a | ||
| # tag push) must never run two `buf push` jobs against the single module at | ||
| # once. Never cancel an in-flight publish; queue the next run instead. | ||
| concurrency: | ||
| group: ${{ github.workflow }} | ||
| cancel-in-progress: false | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Comment on lines
+29
to
+31
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
For bursts of more than two publishes, this single concurrency group does not actually queue every run: GitHub's concurrency docs state that with the default queue behavior, "any existing pending job or workflow in the same concurrency group will be canceled and the new queued job or workflow will take its place." A manual dispatch racing two Useful? React with 👍 / 👎. |
||
|
|
||
| jobs: | ||
| push: | ||
| runs-on: ubuntu-latest | ||
| if: github.repository == 'ai-dynamo/openengine' | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Publishing is gated only by repository identity. |
||
| steps: | ||
| - name: Check out repository | ||
| uses: actions/checkout@v4 | ||
|
Comment on lines
+38
to
+39
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔍 Shallow checkout may weaken buf push git metadata/labeling The new push job uses Was this helpful? React with 👍 or 👎 to provide feedback.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A default depth-1 tag checkout normally exposes the release tag but not the |
||
|
|
||
| - name: Push schema to Buf Schema Registry | ||
| uses: bufbuild/buf-action@v1 | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| with: | ||
| version: "1.71.0" | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is no longer the latest stable Buf CLI. v1.72.0 was published on July 17, 2026. Please update this pin—and the existing |
||
| token: ${{ secrets.BUF_TOKEN }} | ||
|
Comment on lines
+42
to
+45
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This new publishing workflow gives Useful? React with 👍 / 👎. |
||
| push: true | ||
| lint: false | ||
| format: false | ||
| breaking: false | ||
| archive: false | ||
| pr_comment: false | ||
| push_disable_create: true | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,6 +2,7 @@ version: v2 | |
|
|
||
| modules: | ||
| - path: proto | ||
| name: buf.build/ai-dynamo/openengine | ||
|
|
||
| lint: | ||
| use: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because
workflow_dispatchis enabled without any ref guard, a manual run can publish whatever branch the dispatcher selects; GitHub's manual-run docs explicitly include a Branch dropdown andgh workflow run --reffor non-default branches. In this workflowactions/checkoutthen checks out that selected ref and the next step pushes it to BSR, so a maintainer can accidentally publish unmerged or experimental schema from a feature branch; add agithub.refcheck or environment gate so manual publishes only run from the intended release branch/ref.Useful? React with 👍 / 👎.