Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Trigger AWS CodePipeline by GitHub release Webhook

AWS CodePipeline now supports GitHub WebHook, but by default
every time code is pushed(changed) on the master branch, CodePipeline is triggered.

However, I only want it to run when I actually publish a release.
So, I manually configured the auto-generated GitHub WebHook as follows:
(Uncheck Pushes, check Releases)

webhook

but after the configuration, CodePipeline is not kicked any more.
(When I check Pushes again, it starts watching every pushes again)

Does it only watch Pushes action?

If it does, is there any other way to kick CodePipeline by GitHub release actions?

like image 284
sora Avatar asked Feb 03 '23 21:02

sora


1 Answers

CodePipeline's webhooks were designed to handle push events, but I think there's no reason why you shouldn't be able to configure the CodePipeline webhook to trigger on release events. No information from the webhook invocation is actually used as part of the source action, so you could trigger it from anything.

The reason it's not working is probably because of how your webhook filters are configured.

Take a look at the ListWebhooks API to see how your webhook is configured.

This page describes how the filters and authentication configuration is used to match github events to decide whether to trigger a pipeline execution or not.

like image 197
Matthew Sainsbury Avatar answered Feb 07 '23 08:02

Matthew Sainsbury