Skip to content

Commit

Permalink
ci: make workflows runnable ad-hoc (#5056)
Browse files Browse the repository at this point in the history
## Describe your changes

We want to publish the protobuf changes in `protocol/lqt_support`
(#5010) to unblock web integrations. In order to run the workflow ad-hoc
on a branch, we need to permit `workflow_dispatch` runs. The
`workflow_call` additions are not currently used, but have been in the
past, and permit triggering via cross-repo API.

While authoring these changes, I noticed that the protobuf lint job is
_not_ running against feature branches, meaning the PRs into
`protocol/lqt_support` have skipped that check. We've been careful in
authoring the proto changes, but we should still verify that check
passes on the feature branch, prior to publishing.


## Issue ticket number and link
Refs #5010. 

## Checklist before requesting a review


- [ ] If this code contains consensus-breaking changes, I have added the
"consensus-breaking" label. Otherwise, I declare my belief that there
are not consensus-breaking changes, for the following reason:

> no code changes, only affects CI. will result in new protobuf changes
to published to the repo.
  • Loading branch information
conorsch authored Feb 5, 2025
1 parent a655851 commit 95dae9a
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 9 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/buf-pull-request.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: protobuf
on:
# Exclude feature branches, only run if the PR is targeting main.
# Run against all PRs, regardless of feature branch target.
pull_request:
branches:
- "main"
# Also support ad-hoc calls for workflow.
workflow_call:
workflow_dispatch:
jobs:
# Ensure there are no breaking changes to the protocol specs,
# by running the "buf lint" action against the changes in this PR.
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/buf-push.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
name: protobuf
# We want to rebuild on every commit to main, and also for named testnet tags,
# so that API users can pick a tagged version of the protobuf definitions
# to use against a matching testnet.
# 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
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/docs-lint.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: docs-lint
on: pull_request
on:
pull_request:
# Also support ad-hoc calls for workflow.
workflow_call:
workflow_dispatch:

jobs:
rustdocs:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/notes.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: docs

on:
workflow_dispatch:
push:
branches:
- main
workflow_dispatch:
workflow_call:

jobs:

Expand Down

0 comments on commit 95dae9a

Please sign in to comment.