Triggering actions by other repository webhooks #26384
-
Hi, I’d like to ask if there’s a way of triggering actions from other repository webhooks without leaving GitHub platform. For example, when there’s a new release on elixir-lang/elixir, I’d like to trigger a workflow in my docker-elixir repository, ideally with the event (ReleaseEvent) payload. Ideally this would be totally decoupled and I could subscribe to any repository webhooks, even those I don’t have write access to. There’s the I noticed there’s a preview support for WebSub, it looks like by subscribing to a topic we (understandably so) set up a webhook, but this means I can only subscribe to repos I am allowed to create webhooks on. This can be solved today by having a workflow in my docker-elixir that runs on schedule and checks whether there’s a new release in elixir-lang/elixir, and if so it buils the image. If I get elixir-lang/elixir maintainers to set up a webhook, that webhook could hit a web app I maintain that in turn would trigger Are there any other ways of solving this? |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments
-
You can put a client_payload in a repository_dispatch and use that information during your run. However, you still need a way to send that event which is going to require your own webhook for now. This sort of automatic dependency building is something we are looking at for the future but the potential scale concerns are significant. |
Beta Was this translation helpful? Give feedback.
-
@chrispat i cannot see https://developer.github.com/v3/repos/#create-a-repository-dispatch-event can you clarify? Thanks! |
Beta Was this translation helpful? Give feedback.
-
Unfortuately the docs are lagging a bit. If you simply add something like
to the post body for your request it should be available in the github.event context |
Beta Was this translation helpful? Give feedback.
-
For anyone landing here and needing a more specific example: send event with body
access fields of the payload directly, or simply the entire payload as json
|
Beta Was this translation helpful? Give feedback.
-
Hello, |
Beta Was this translation helpful? Give feedback.
-
@github, has there been any movement on this? As you refuse to provide a way for us to stop automatic updates of your runner, it would go some way to alleviating the pain if you would providing a webhook that we could use to trigger automatic builds of our containers every time you update your runner. Thanks |
Beta Was this translation helpful? Give feedback.
You can put a client_payload in a repository_dispatch and use that information during your run. However, you still need a way to send that event which is going to require your own webhook for now. This sort of automatic dependency building is something we are looking at for the future but the potential scale concerns are significant.