What happened to github.event.head_commit.modified? #25597
-
Out of the box, GitHub Actions makes it possible to run workflows conditionally on the modification of a path:
I have the vague memory that there was a time where
I created a simple action that queries the It’s easy enough to use that action to impose conditions on running a step, but I would like to put conditions on jobs inside a workflow. Since there is a steps, but not a jobs context, this is not straightforward. Any idea of how I could achieve this result? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
That attribute was removed. See the blog post here. I don’t know how to add to properties in the job context of the current workflow, but what you could do is trigger a repository_dispatch event and send whatever context you need to a second workflow. This could include the output of your action. Then it would be available immediately and useable via job conditions in the second workflow. This action might help if you want to try that idea. |
Beta Was this translation helpful? Give feedback.
-
Very nice, thanks. I’ll let others chip in but this seems an appropriate workaround. |
Beta Was this translation helpful? Give feedback.
That attribute was removed. See the blog post here.
I don’t know how to add to properties in the job context of the current workflow, but what you could do is trigger a repository_dispatch event and send whatever context you need to a second workflow. This could include the output of your action. Then it would be available immediately and useable via job conditions in the second workflow. This action might help if you want to try that idea.