ci: make workflows runnable ad-hoc (#5056) #2297
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
name: protobuf | |
# We're keeping the protodefs stable at v1, via buf lint checks on PRs. | |
# Therefore it's safe to publish on every commit to main (and also tags). | |
on: | |
push: | |
branches: | |
- main | |
# Consider automatically publishing on upcoming protocol changes, | |
# to allow integration in downstream, e.g. web dependencies. | |
# - protocol/* | |
tags: | |
- '**' | |
# Also support ad-hoc calls for workflow | |
workflow_call: | |
workflow_dispatch: | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: bufbuild/buf-setup-action@v1 | |
with: | |
buf_api_token: ${{ secrets.BUF_TOKEN }} | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
input: 'proto' | |
- uses: bufbuild/buf-lint-action@v1 | |
with: | |
input: 'proto' | |
# N.B. We don't check for breaking changes here, because we do so per-PR, and notify there. | |
# Occasionally we'll make breaking changes, the PR CI is notification enough of that. | |
# We still want to publish the resulting changes to the BSR. | |
- uses: bufbuild/buf-push-action@v1 | |
with: | |
buf_token: ${{ secrets.BUF_TOKEN }} | |
input: 'proto/penumbra' |