-
Notifications
You must be signed in to change notification settings - Fork 904
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
Push Protobufs to Buf Schema Registry #4923
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 |
---|---|---|
|
@@ -451,3 +451,35 @@ jobs: | |
with: | ||
name: artifacts | ||
path: ./out/artifacts | ||
|
||
|
||
protobuf-schemas: | ||
runs-on: ubuntu-22.04 | ||
needs: detect-noop | ||
if: needs.detect-noop.outputs.noop != 'true' | ||
|
||
steps: | ||
|
||
- name: Checkout | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | ||
|
||
- name: Setup Buf | ||
uses: bufbuild/buf-setup-action@v1 | ||
|
||
- name: Lint Protocol Buffers | ||
uses: bufbuild/buf-lint-action@v1 | ||
with: | ||
input: apis | ||
|
||
- name: Detect Breaking Changes in Protocol Buffers | ||
uses: bufbuild/buf-breaking-action@v1 | ||
with: | ||
input: apis | ||
against: "https://github.com/${GITHUB_REPOSITORY}.git#branch=master,subdir=apis" | ||
|
||
- name: Push Protocol Buffers to Buf Schema Registry | ||
if: github.ref == 'refs/heads/master' | ||
uses: bufbuild/buf-push-action@v1 | ||
with: | ||
input: apis | ||
buf_token: ${{ secrets.BUF_TOKEN }} | ||
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. Unfortunately the Buf Schema Registry doesn't seem to support robots, so I'll need to create a token associated with my account and use that. We'll also need at least one other maintainer to create an account for redundancy. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Generated by buf. DO NOT EDIT. | ||
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. what's the expected workflow for this type of file being updated? is it something a developer will ever need to do with the 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. Exceedingly rarely. The command is |
||
version: v1 | ||
deps: | ||
- remote: buf.build | ||
owner: protocolbuffers | ||
repository: wellknowntypes | ||
commit: 44e83bc050a4497fa7b36b34d95ca156 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
version: v1 | ||
name: buf.build/crossplane/crossplane | ||
deps: | ||
- buf.build/protocolbuffers/wellknowntypes:v24.4 | ||
breaking: | ||
use: | ||
- FILE | ||
lint: | ||
use: | ||
- DEFAULT |
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.
should there be a local part of the workflow here? e.g.
make reviewable
does this same check so devs can have confidence in their commit before opening a PR?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.
It would be nice to have, but I feel a sense of urgency to have something in place and I don't want to take on teaching the Makefile and/or build submodule about
buf
right now. I've raised #4924 to track this.