Skip to content

Commit 110e473

Browse files
committed
Add manual events to testing workflow triggers
The `workflow_dispatch` event allows triggering the workflow via the GitHub web interface. This makes it easy to trigger an immediate workflow run after some relevant external change. The `repository_dispatch` event allows triggering workflows via the GitHub API. This might be useful for triggering an immediate check in multiple relevant repositories after an external change, or some automated process. Although we don't have any specific need for this event at the moment, the event has no impact on the workflow, so there is no reason against having it. It is the sort of thing that can end up being useful if it is already in consistently in place, but not worth setting up on demand, since the effort to set it up is greater than the effort to trigger all the workflows manually.
1 parent 713bbc5 commit 110e473

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

.github/workflows/test-go-integration-task.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ env:
77
# See: https://github.com/actions/setup-python/tree/v2#available-versions-of-python
88
PYTHON_VERSION: "3.9"
99

10+
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows
1011
on:
1112
push:
1213
paths:
@@ -28,6 +29,8 @@ on:
2829
- "poetry.lock"
2930
- "pyproject.toml"
3031
- "tests/**"
32+
workflow_dispatch:
33+
repository_dispatch:
3134

3235
jobs:
3336
test:

.github/workflows/test-go-task.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ env:
55
# See: https://github.com/actions/setup-go/tree/v2#readme
66
GO_VERSION: "1.16"
77

8+
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows
89
on:
910
push:
1011
paths:
@@ -22,6 +23,8 @@ on:
2223
- "go.sum"
2324
- "**/*.go"
2425
- "**/testdata/**"
26+
workflow_dispatch:
27+
repository_dispatch:
2528

2629
jobs:
2730
test:

0 commit comments

Comments
 (0)