Is it possible to have have a trigger for GitHub “release” events ?
I appreciate that these are essentially “tags” however the release event has additional data in the webhook, specifically I am interested in this part of the JSON:
I can see from the documentation that under event triggers there is a type called “custom” though I couldn’t find any documentation on how to use this. Additionally is there anyway of accessing the webhook JSON as it doesn’t appear like any of the automatic drone variables would capture this?
Drone does not currently support release events. Drone supports push events (which includes pushing branches and tags) and pull_request events (open and sync actions).
Thanks for the reply. To the second part of the question, is it possible at all to access the JSON data provided in the Webhook. I think I can meet my use case by using tag events but need to access data in the webhook that isn’t surfaced via the automatic DRONE variables.
We do not store the original JSON payloads in Drone. We extract a subset of variables from the payload and we make those variables available to your pipeline as environment variables. You can find a list of variables at https://docs.drone.io/pipeline/environment/reference/
Thanks for clarifying this, is it plausible for us to create an extension / plugin that could extract the additional variables from the webhook and include them? If so do you have a suggestion for where we could start with this ?
Environment extensions can be used to inject additional environment variables into Drone pipelines. You could, for example, create an extension that makes an API call to GitHub to fetch and then inject additional data into your pipeline as environment variables. There is no option, however, to access the raw webhook and extract and store additional data.