Provide URL to Specific Job Step #26563
-
I’d like to be able to access/provide a link to a specific step in a ran job. For example, if I wanted to post a comment on a PR providing a link to a specific step that has relevant output to the developer, it would be nice to access it via In practice, something like this:
Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
So I have a “way” you can do this, but it is a little hacky. You can actually get the link to a specific step, when looking at the build log in the UI, by clicking on the line number of that step. For example: github.comBuild software better, togetherygoussetorg/actions-demos/runs/2411911374 GitHub is where people build software. More than 65 million people use GitHub to discover, fork, and contribute to over 200 million projects. will take you to a run of my workflow, open the second step, and place focus on the first line. The “2” in the URL indicates that you want to go to the second step of the workflow. The “1” indicates go to the first line of output for that step. So, if you know the order of the steps, you can make this work. You can get the workflow run number from the github context object. Then, you can hard-code the step number, along with “1”, and set that into the PR or issue or whatever. Yes, if you modify the order of the steps in your job, then you have to fix this, but it would work. |
Beta Was this translation helpful? Give feedback.
-
Ah, I had no idea! It is a little hacky, but it’s good enough as far as a working solution goes 👍 Appreciate it! |
Beta Was this translation helpful? Give feedback.
-
FYI I’m including this example in a talk I’m giving in June. :slight_smile: |
Beta Was this translation helpful? Give feedback.
-
Awesome! I’d be interested in tuning in if it’s available online anywhere 👍 |
Beta Was this translation helpful? Give feedback.
So I have a “way” you can do this, but it is a little hacky.
You can actually get the link to a specific step, when looking at the build log in the UI, by clicking on the line number of that step. For example:
github.comBuild software better, together
ygoussetorg/actions-demos/runs/2411911374
GitHub is where people build software. More than 65 million people use GitHub to discover, fork, and contribute to over 200 million projects.
will take you to a run of my workflow, open the second step, and place focus on the first line. The “2” in the URL indicates that you want to go to the second step of the workflow. The “1” indicates go to the first line of output for that step.
So, if you…