How do I extend an existing workflow for different trigger? #25322
-
I have 1 workflow that is triggered by 2 different events. However, it’s come to a point where I need to extend it for one of the triggers; it would still do the same thing, but for one of the triggers, it would perform some additional steps right after. How do I achieve something like this? I know I can just copy the workflow to a new file with the extended steps, but it’d be nice if I can reuse some part of a workflow spec without have to copy the actual spec. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
That sounds like something you can do with |
Beta Was this translation helpful? Give feedback.
-
Ah! I didn’t know there’s an I think this could work. Thanks! |
Beta Was this translation helpful? Give feedback.
That sounds like something you can do with
if:
conditions either on steps or jobs using data from thegithub
context. If you just want to know about the event type you can usegithub.event_name
, if you need event details you’ll have to look intogithub.event
properties.