-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ci): add support for pushing proto definitions to Buf Schema Re…
…gistry
- Loading branch information
Showing
3 changed files
with
47 additions
and
1 deletion.
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,23 @@ | ||
name: buf-ci | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- "v[0-9]+.x" | ||
pull_request: | ||
permissions: | ||
contents: read | ||
pull-requests: write | ||
jobs: | ||
buf: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: bufbuild/buf-setup-action@v1 | ||
- uses: bufbuild/buf-breaking-action@v1 | ||
with: | ||
input: pb | ||
against: 'https://github.com/celestiaorg/go-square.git#branch=main,subdir=proto' | ||
- uses: bufbuild/buf-lint-action@v1 | ||
with: | ||
input: pb |
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,23 @@ | ||
name: buf-release | ||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: bufbuild/buf-setup-action@v1 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
version: "1.44.0" | ||
# Push the protobuf definitions to the BSR | ||
- uses: bufbuild/buf-push-action@v1 | ||
with: | ||
buf_token: ${{ secrets.BUF_TOKEN }} | ||
- name: "push the tag label to BSR" | ||
run: | | ||
set -euo pipefail | ||
echo ${{ secrets.BUF_TOKEN }} | buf registry login --token-stdin | ||
buf push --label ${{ github.ref_name }} |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
version: v1 | ||
version: v2 | ||
name: buf.build/celestiaorg/go-square | ||
breaking: | ||
use: | ||
|