-
Notifications
You must be signed in to change notification settings - Fork 0
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
[Do not merge] Prototype new GitHub workflows for push++ #105
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 @@ | ||
v1.32.0-beta.1 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: buf (Pull Request) | ||
on: | ||
- pull_request | ||
jobs: | ||
buf: | ||
runs-on: ubuntu-latest | ||
if: ${{ ! contains(github.event.pull_request.labels.*.name, 'Skip Buf Breaking') }} | ||
steps: | ||
- name: Checkout PR head | ||
uses: actions/checkout@v4 | ||
- name: Checkout PR base | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.pull_request.base.sha }} | ||
path: .base | ||
- name: Install buf cli | ||
uses: bufbuild/buf-setup-action@v1 | ||
with: | ||
version: 1.32.0-beta.1 # remove this flag when 1.32.0 is released so we go back to always tracking latest. | ||
# todo: use .bufversion or the env variable? | ||
github_token: ${{ github.token }} # is this necessary? | ||
- name: buf breaking against PR base | ||
run: buf breaking --against .base --error-format github-actions |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: buf (Push) | ||
on: | ||
- push | ||
jobs: | ||
buf: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install buf cli | ||
uses: bufbuild/buf-setup-action@v1 | ||
with: | ||
version: 1.32.0-beta.1 # remove this flag when 1.32.0 is released so we go back to always tracking latest. | ||
# todo: use .bufversion or the env variable? | ||
github_token: ${{ github.token }} # is this necessary? | ||
- name: buf build | ||
run: buf build --error-format github-actions | ||
- name: buf format | ||
run: buf format --diff --exit-code --error-format github-actions | ||
- name: buf lint | ||
run: buf lint --error-format github-actions | ||
- name: buf push | ||
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. as currently implemented, push doesn't happen on a branch if build, format, or lint fail 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. do we want to push even if lint and build fail? |
||
run: buf push --label ${{ github.ref }} --git-metadata --error-format github-actions | ||
with: | ||
buf_token: ${{ secrets.BUF_TOKEN }} |
This file was deleted.
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.
this line could be deleted if the action already supported .bufversion, which is in the proposal, but not implemented by the current action