Skip to content

Commit 95dae9a

Browse files
authored
ci: make workflows runnable ad-hoc (#5056)
## 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.
1 parent a655851 commit 95dae9a

File tree

4 files changed

+20
-9
lines changed

4 files changed

+20
-9
lines changed

.github/workflows/buf-pull-request.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
name: protobuf
22
on:
3-
# Exclude feature branches, only run if the PR is targeting main.
3+
# Run against all PRs, regardless of feature branch target.
44
pull_request:
5-
branches:
6-
- "main"
5+
# Also support ad-hoc calls for workflow.
6+
workflow_call:
7+
workflow_dispatch:
78
jobs:
89
# Ensure there are no breaking changes to the protocol specs,
910
# by running the "buf lint" action against the changes in this PR.

.github/workflows/buf-push.yml

+9-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
name: protobuf
2-
# We want to rebuild on every commit to main, and also for named testnet tags,
3-
# so that API users can pick a tagged version of the protobuf definitions
4-
# to use against a matching testnet.
2+
# We're keeping the protodefs stable at v1, via buf lint checks on PRs.
3+
# Therefore it's safe to publish on every commit to main (and also tags).
54
on:
65
push:
76
branches:
87
- main
8+
# Consider automatically publishing on upcoming protocol changes,
9+
# to allow integration in downstream, e.g. web dependencies.
10+
# - protocol/*
911
tags:
1012
- '**'
13+
# Also support ad-hoc calls for workflow
14+
workflow_call:
15+
workflow_dispatch:
16+
1117
jobs:
1218
publish:
1319
runs-on: ubuntu-latest

.github/workflows/docs-lint.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: docs-lint
2-
on: pull_request
2+
on:
3+
pull_request:
4+
# Also support ad-hoc calls for workflow.
5+
workflow_call:
6+
workflow_dispatch:
37

48
jobs:
59
rustdocs:

.github/workflows/notes.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
name: docs
2-
32
on:
4-
workflow_dispatch:
53
push:
64
branches:
75
- main
6+
workflow_dispatch:
7+
workflow_call:
88

99
jobs:
1010

0 commit comments

Comments
 (0)