-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
243 additions
and
278 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: buf-push | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'proto/**' | ||
|
||
jobs: | ||
push: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
# This step sets up the variable steps.buf-version.outputs.v | ||
# to contain the version of Buf (e.g. v1.36.0) from go.mod. | ||
- name: Get Buf version | ||
id: buf-version | ||
run: | | ||
BUF_VERSION=$( go list -m -f '{{.Version}}' github.com/bufbuild/buf ) | ||
# remove the leading 'v' in front of the version | ||
BUF_VERSION=${BUF_VERSION#v} | ||
echo "v=$BUF_VERSION" >> "$GITHUB_OUTPUT" | ||
- uses: bufbuild/buf-action@v1 | ||
with: | ||
version: ${{ steps.buf-version.outputs.v }} | ||
token: ${{ secrets.BUF_TOKEN }} | ||
input: 'proto' | ||
# The repository should already exist. | ||
# If it can be automatically created, that's a sign that it was deleted, | ||
# which is likely a major issue, which we want to be aware of. | ||
push_disable_create: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: buf-validate | ||
|
||
on: | ||
pull_request: | ||
# 'labeled' and 'unlabeled' are included so we can use the 'Buf Skip Breaking' label | ||
# and skip a breaking change if that's required. | ||
# See: https://github.com/bufbuild/buf-action?tab=readme-ov-file#skip-the-breaking-change-detection-step | ||
types: [opened, synchronize, reopened, labeled, unlabeled] | ||
paths: | ||
- 'proto/**' | ||
|
||
jobs: | ||
validate: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
# This step sets up the variable steps.buf-version.outputs.v | ||
# to contain the version of Buf (e.g. v1.36.0) from go.mod. | ||
- name: Get Buf version | ||
id: buf-version | ||
run: | | ||
BUF_VERSION=$( go list -m -f '{{.Version}}' github.com/bufbuild/buf ) | ||
# remove the leading 'v' in front of the version | ||
BUF_VERSION=${BUF_VERSION#v} | ||
echo "v=$BUF_VERSION" >> "$GITHUB_OUTPUT" | ||
- uses: bufbuild/buf-action@v1 | ||
with: | ||
version: ${{ steps.buf-version.outputs.v }} | ||
token: ${{ secrets.BUF_TOKEN }} | ||
input: 'proto' | ||
push: false | ||
breaking_against: '${{ github.event.repository.clone_url }}#branch=main,subdir=proto' |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.