-
Select Topic AreaProduct Feedback Bodytl;drPlease link to Actions job summaries prominently when generated by an Actions run. Alternatively, provide the URL to these summaries to workflow authors to allow them to link to them as they see fit. Specific feedbackConcretely, please consider linking to Actions job summaries;
Alternatively, please make it possible for workflow authors to easily obtain the URL to the markdown summary they just generated so that they can use other GitHub features like Commit Statuses or Deployments to link to it on Pull Requests. Obtaining the Job ID for a currently executing job is currently quite challenging, requiring a series of various workarounds that make it not something that can be easily made reusable. BackgroundI'm the maintainer of an Actions workflow that my organization uses internally. I'm using the lovely job summary feature as a part of an attempt to provide context about the execution of the workflow to users beyond just raw logs. Unfortunately, I'm finding that many of the frequent users of this workflow haven't ever seen the step summary that I've carefully crafted. From the context of the PR merge box, the rendered HTML generated by the summary of a step is only accessible after two clicks - "Details", then "Summary" to get from the step view back to the Actions Run overview - and a scroll to take you "below the fold" on the page. This isn't great; if a user must first navigate through and away from the logs of an Actions step to get to the "summary," we're not really saving them any steps here. In fact, one user suggested we I've wasted a few hours trying to link to the job summary myself this morning, only to be disappointed by how challenging it is to obtain the last
Job IDs are notoriously hard to obtain; a series of workarounds are scattered around Stack Overflow and this forum. Complicating things further is the fact that the workflow I maintain is a reusable workflow called from other repos in my org; for my reusable workflow to know the name that the GitHub API has assigned an actions Job so that it can obtain its ID, I must know the name that the caller has used in the Job that calls my workflow. 🤯 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
Work-Around for this case: let the summary create a (custom) link destination and link to this one. I agree that gh_job_id (or whatever we call it) should be available to make many ideas easier. Also suggested in 2021 as By the way, to find the current job id, |
Beta Was this translation helpful? Give feedback.
-
|
Job ID is available as |
Beta Was this translation helpful? Give feedback.
Job ID is available as
job.check_run_id, e.g. using${{ format('{0}/{1}/actions/runs/{2}#summary-{3}', github.server_url, github.repository, github.run_id, job.check_run_id) }}will get you the proper link to the summary for the running job.