-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add buf .github/workflow actions to @observerly/birpc
ci: add buf .github/workflow actions to @observerly/birpc
- Loading branch information
1 parent
a9db802
commit 7152c42
Showing
3 changed files
with
83 additions
and
0 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,5 @@ | ||
# Always validate the PR title AND all the commits | ||
titleAndCommits: true | ||
# Allows use of Merge commits (eg on github: "Merge branch 'master' into feature/ride-unicorns") | ||
# this is only relevant when using commitsOnly: true (or titleAndCommits: true) | ||
allowMergeCommits: 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,39 @@ | ||
name: protorepo/buf | ||
|
||
on: | ||
# Apply to all pull requests on the main branch | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
buf: | ||
strategy: | ||
matrix: | ||
os: [ ubuntu-latest ] | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Checkout 🛎 | ||
uses: actions/checkout@v4 | ||
|
||
# Install the `buf` CLI | ||
- name: Install buf CLI | ||
uses: bufbuild/buf-setup-action@v1 | ||
|
||
# Check for breaking changes in the 'proto' directory on all pull requests | ||
- name: Check for Buf breaking changes | ||
uses: bufbuild/buf-breaking-action@v1 | ||
with: | ||
input: proto | ||
against: 'https://github.com/observerly/birpc.git#branch=main,ref=HEAD~1,subdir=proto' | ||
|
||
# Check for lint errors in the 'proto' directory on all pull requests | ||
- name: Check for Buf lint errors | ||
uses: bufbuild/buf-lint-action@v1 | ||
with: | ||
input: proto |
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,39 @@ | ||
name: protorepo/publish | ||
|
||
on: | ||
# Apply to all pull requests on the main branch | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
release: | ||
types: [published] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
publish: | ||
strategy: | ||
matrix: | ||
os: [ ubuntu-latest ] | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Checkout 🛎 | ||
uses: actions/checkout@v4 | ||
|
||
# Install the `buf` CLI | ||
- name: Install buf CLI | ||
uses: bufbuild/buf-setup-action@v1 | ||
|
||
# Push only the Input in `proto` to the BSR (Buf Schema Registry): | ||
- name: Push to Buf Schema Registry | ||
uses: bufbuild/buf-push-action@v1 | ||
with: | ||
input: proto | ||
buf_token: ${{ secrets.BUF_API_TOKEN }} | ||
create_visibility: private | ||
draft: ${{ github.ref_name != 'main'}} | ||
|