-
Is there a way to see the actual documentation / specs for the My end goal is to have a workflow run only on PR merges or manual triggers, so I have the following configuration:
and in my job, I do indeed need to check if the PR is merged
but that means that if I trigger a manual workflow, the So my question is two-fold:
For reference, I did read through https://docs.github.com/en/free-pro-team@latest/actions/reference/context-and-expression-syntax-for-github-actions#github-context but that only covers some of the docs UPDATE |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 4 replies
-
The best documentation I’m aware of is here: Events that trigger workflows For most event types there’s a link to the webhook event payload documentation in the section on that event type on that page, e.g. here is the one for |
Beta Was this translation helpful? Give feedback.
-
Thanks for the response. Unfortunately I had already seen this page too and there isn’t much there either in terms of verifying that the event is indeed for |
Beta Was this translation helpful? Give feedback.
-
I did manage to find how to do so by first adding a step to print out the
This allowed me to see that the github object contains an It was then very easy to modify my
note: somehow using double quotes around |
Beta Was this translation helpful? Give feedback.
-
Using
|
Beta Was this translation helpful? Give feedback.
I did manage to find how to do so by first adding a step to print out the
github
object.This allowed me to see that the github object contains an
event_name
key, which, in the case of aworkflow_dispatch
event, containsworkflow_dispatch
.It was then very easy to modify my
if
clause to also check for this key.note: somehow using double quotes around
"workflow_dispatch"
in theif
clause raises an error (Unknown identifier), so make sure to use single quotes