Get Runs Url

Hi,

I’m trying to add the URL to a notification push on a build failure and I’m looking to get the Runs URL so I can associate the workflow log with a mesage I’m sending to Slack. Is there a variable within the workflow that has the the Runs URL?

I haven’t found any, unfortunately. It seems there is no check run id, check suite id, or anything like that available. There is a horrible workaround though - call Github API to list all check runs for the current SHA, and find the one that has the same name as your step, and is in progress (or possibly queued, I think sometimes the API isn’t 100% in sync with the start of the execution). The response has all the urls you need.

You should be able to use the github context to create a URL to your run’s execution, like so:
https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}