Self Host Runner - Avoid Event fire in the webhook endpoint

I have a repository that we setup to use self-hosted runners but not all the jobs from workflows implemented should use self-hosted runners.

The tests we do, the webhook we setup receive all the events from workflows in the repository.

There’s some way to avoid this, only receive events that we setup as self-hosted?

If not, when we receive the event, there’s some info in the payload to see if that event is self-hosted or not?

Because now we are in the scenario that a event is fired by a PR creation for example, and it’s executed by GitHub Runners and also is received by webhook, it instanciate a machine, but the event is ignored by github-runner binary because of course is not self-hosted, but we are creating a instance for nothing.

Hey and welcome @joseproura ! Does checking out the action key in the webhook payload help you out?

Thanks, I will check that option

1 Like