workflow-dispatch icon indicating copy to clipboard operation
workflow-dispatch copied to clipboard

Link to GH Action workflow run?

Open janpio opened this issue 2 years ago • 3 comments

Is there a way to output a link to the workflow run the dispatch started? Right now one has to go over the other workflow or repo, and make the connection manually. Would be much nicer if we could just click a link that is output in the job that uses this action.

janpio avatar Nov 24 '23 11:11 janpio

In summary - no there isn't.

As the GitHub API doesn't return the run-id of the dispatched run

benc-uk avatar May 30 '24 07:05 benc-uk

I was curious: https://docs.github.com/en/rest/actions/workflows?apiVersion=2022-11-28#create-a-workflow-dispatch-event The return is just Status: 204 from what I can see.

There is a request https://github.com/orgs/community/discussions/9752 to make it return the run-id. I can see some people got creative with some workarounds too 😄

The person who created the discussion mentions their PR https://github.com/convictional/trigger-workflow-and-wait/pull/37

So technically we could try a similar approach here, but I can understand if this is not a priority.

Jolg42 avatar May 30 '24 10:05 Jolg42

The workarounds all seem pretty horrible IMO Either putting UUID in the run name, which is hella ugly as it's visible to users, or some checking of timestamps which is never going to be reliable

benc-uk avatar May 30 '24 11:05 benc-uk