Skip to content

Commit

Permalink
Dogfooding buf sync operations (#2279)
Browse files Browse the repository at this point in the history
This PR adds a workflow with the same rules as `buf.yaml`, to sync the
repo in a private shadow repo under buftest org. This is with the
purpose of dogfooding `buf sync` command.
  • Loading branch information
unmultimedio authored Jul 10, 2023
1 parent 1004254 commit ea15691
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/buf-shadow-sync.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Buf shadow sync

on:
# Same config as buf.yaml workflow
push:
paths:
- 'proto/**'
workflow_dispatch: # also allow manual trigger

jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # fetch all branches and commits, so we can loop them
- run: git remote set-head origin --auto # set a HEAD for remote/origin, so buf sync can pickup the current default branch
- uses: bufbuild/[email protected]
with:
github_token: ${{ github.token }}
buf_user: bufbot
buf_api_token: ${{ secrets.BUF_TOKEN }}
- run: buf alpha repo sync -v --debug --timeout 0 --module proto:buf.build/buftest/buf-shadow-sync --create --create-visibility private

0 comments on commit ea15691

Please sign in to comment.