Is there a way to know if a job was trigger by "re-run" button

The idea here is to know if a job was manually triggered.

I can use workflow_dispatch but only if I run the workflow manually.

What if I run a specific old job manually instead of the whole workflow? How do I know this happenned?


Not sure if my question is exactly the same, want to try reviving this post first.

Is there a way to know if workflow got triggered by Re-run button from PR page? I thought that event_name would change to workflow_dispatch but that’s not the case. I’m logging event_name and it remains pull_request_target as the original one was (raised by Dependabot in my case).

I assume that the actor gets changed to my GH user account (cause permissions change) but event type remains the same.

1 Like

Currently there is nothing in the UI or any context information that can easily identify a re-run. As mentioned the actor information or any other context information could be used alongside cache/artifacts to try to do some comparison or save some state but overall it’s quite hacky and not very elegant (personally I don’t recommend this).

In general we’ve seen feedback about being able to view logs for re-runs more easily and I would classify this under the same group of improvements. We’ll be improving this for sure in the long run. Just lots of other priorities at this time :slight_smile:


Thank you guys for your feedback! :slight_smile: