Skip to content

Commit

Permalink
chore(ci): add support for pushing proto definitions to Buf Schema Re…
Browse files Browse the repository at this point in the history
…gistry
  • Loading branch information
rach-id committed Oct 7, 2024
1 parent 1f814d6 commit e5d81c4
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 1 deletion.
23 changes: 23 additions & 0 deletions .github/workflows/buf-ci.yml
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
23 changes: 23 additions & 0 deletions .github/workflows/buf-release.yml
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 }}
2 changes: 1 addition & 1 deletion buf.yaml
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:
Expand Down

0 comments on commit e5d81c4

Please sign in to comment.