Skip to content

ci: make workflows runnable ad-hoc (#5056) #2297

ci: make workflows runnable ad-hoc (#5056)

ci: make workflows runnable ad-hoc (#5056) #2297

Workflow file for this run

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'