You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gh run view -R neovim/neovim --log --job=43904694235 --step=3
An alternative solution would be to solve https://github.com/orgs/community/discussions/41351 which would add more accurate timestamps to a step's startedAt and completedAt.
This would allow me to correlate the steps logs from the full job logs.
Additional context
I would like to build a UI similar to github's job page.
The page allows the user to expand the different steps of the job, and see only the correlated logs.
When you run gh run view -R neovim/neovim --log --job=43904694235 the second column in most cases should contain the step name that you could filter on but I see that specific example reports UNKNOWN STEP. We have a few open issues with the actions team about resolving this. I don't think it would be tremendously hard to add --step but just curious if you would still need that if the step was correctly reported in the log output and you could grep it. Helps us prioritise!
Got it, yes any time we see UNKNOWN STEP it's a result of the log service having been changed underneath the CLI. All the reports of this being a problem are useful to us getting the prioritised so thanks for opening this up. Vaguely recall that it most commonly occurs after some period of time and if you get the logs shortly after the run, the steps will be there.
Catching up on this conversation, I believe CLI maintainers need to collaborate with Actions team on a more accurate solution than slicing job logs by timestamp.
The GitHub UI does fetch a specific step logs by calling:
An alternative solution would be to solve https://github.com/orgs/community/discussions/41351 which would add more accurate timestamps to a step's startedAt and completedAt.
This would allow me to correlate the steps logs from the full job logs.
I think the API challenges in this issue are due the larger check suites and runs framework that GitHub Actions workflow runs and jobs are built on, which doesn't have any concept that maps to GitHub Actions workflow run steps.
So I imagine the GitHub Actions logs are stored as a whole, which would require an API endpoint that could parse the logs for clients to return the step specific portion.
Ideally, it would be nice if the log file contained metadata denoting the separate steps.
Just to help clarify, adding a --step flag would not solve my issue entirely.
Some of of the steps in our company's CI are huge and contain 20K lines.
Fetching the entire run can take upwards of 20 seconds.
I would like to avoid fetching these steps and doing something similar to the github website where it can fetch only a specific step's logs. E.g. https://github.com/neovim/neovim/commit/7935cf4f7f35150d3c04e719938046d4cfa8f905/checks/43904694235/logs/2
I’m trying to implement a somewhat tricky task: accessing the logs of the previous step from within a running GitHub Actions workflow in order to determine certain things.
While testing the currently used /repos/{owner}/{repo}/actions/jobs/{job_id}/logs endpoint, I realized that it's not possible to retrieve logs for a job while the job is still running, because the API only provides the complete log archive and returns 404 for unfinished jobs. (there was SO question https://stackoverflow.com/questions/74042833/ taking about similar situation)
Then I discovered https://github.com/{owner}/{repo}/commit/{commit_id}/checks/{job_id}/logs/{step_id} from the GitHub Actions Web UI, which actually fits this use case. However, it's not a public API, and it's also inaccessible through the gh CLI even though it requires authentication (you can't access with token but cookie).
Hope the GitHub Actions and CLI teams can work together to make this officially supported and publicly accessible.
@williammartin would GitHub consider exposing per-step Actions logs through the supported API/auth model?
Ideally something centered on the job/run URL users already have, e.g. GET /repos/{owner}/{repo}/actions/jobs/{job_id}/steps GET /repos/{owner}/{repo}/actions/jobs/{job_id}/steps/{step_number}/logs
or an equivalent supported version of: https://github.com/{owner}/{repo}/runs/{job_id}/logs/{step_number}
The web UI already has this data via steps?change_id=0 and per-step log URLs, but those seem tied to browser session auth rather than GitHub App installation tokens / PAT API auth.
Activity
williammartin commentedon Jun 21, 2025
Hey @dlvhdr,
When you run
gh run view -R neovim/neovim --log --job=43904694235the second column in most cases should contain the step name that you could filter on but I see that specific example reportsUNKNOWN STEP. We have a few open issues with the actions team about resolving this. I don't think it would be tremendously hard to add--stepbut just curious if you would still need that if the step was correctly reported in the log output and you couldgrepit. Helps us prioritise!dlvhdr commentedon Jun 21, 2025
Hey @williammartin, this would definitely help!
But, currently, I haven't seen a case where the step is different than
UNKNOWN STEP.I've checked various repos and jobs and always get only these.
e.g. running:
In other cases,
ghfails to find the logs because of #11059williammartin commentedon Jun 21, 2025
Got it, yes any time we see
UNKNOWN STEPit's a result of the log service having been changed underneath the CLI. All the reports of this being a problem are useful to us getting the prioritised so thanks for opening this up. Vaguely recall that it most commonly occurs after some period of time and if you get the logs shortly after the run, the steps will be there.andyfeller commentedon Jun 23, 2025
Catching up on this conversation, I believe CLI maintainers need to collaborate with Actions team on a more accurate solution than slicing job logs by timestamp.
I think the API challenges in this issue are due the larger check suites and runs framework that GitHub Actions workflow runs and jobs are built on, which doesn't have any concept that maps to GitHub Actions workflow run steps.
So I imagine the GitHub Actions logs are stored as a whole, which would require an API endpoint that could parse the logs for clients to return the step specific portion.
Ideally, it would be nice if the log file contained metadata denoting the separate steps.
dlvhdr commentedon Dec 10, 2025
Just to help clarify, adding a
--stepflag would not solve my issue entirely.Some of of the steps in our company's CI are huge and contain 20K lines.
Fetching the entire run can take upwards of 20 seconds.
I would like to avoid fetching these steps and doing something similar to the github website where it can fetch only a specific step's logs. E.g.
https://github.com/neovim/neovim/commit/7935cf4f7f35150d3c04e719938046d4cfa8f905/checks/43904694235/logs/2chawyehsu commentedon May 8, 2026
I’m trying to implement a somewhat tricky task: accessing the logs of the previous step from within a running GitHub Actions workflow in order to determine certain things.
While testing the currently used
/repos/{owner}/{repo}/actions/jobs/{job_id}/logsendpoint, I realized that it's not possible to retrieve logs for a job while the job is still running, because the API only provides the complete log archive and returns 404 for unfinished jobs. (there was SO question https://stackoverflow.com/questions/74042833/ taking about similar situation)Then I discovered
https://github.com/{owner}/{repo}/commit/{commit_id}/checks/{job_id}/logs/{step_id}from the GitHub Actions Web UI, which actually fits this use case. However, it's not a public API, and it's also inaccessible through the gh CLI even though it requires authentication (you can't access with token but cookie).Hope the GitHub Actions and CLI teams can work together to make this officially supported and publicly accessible.
Scalahansolo commentedon May 9, 2026
@williammartin would GitHub consider exposing per-step Actions logs through the supported API/auth model?
Ideally something centered on the job/run URL users already have, e.g.
GET /repos/{owner}/{repo}/actions/jobs/{job_id}/stepsGET /repos/{owner}/{repo}/actions/jobs/{job_id}/steps/{step_number}/logsor an equivalent supported version of:
https://github.com/{owner}/{repo}/runs/{job_id}/logs/{step_number}The web UI already has this data via
steps?change_id=0and per-step log URLs, but those seem tied to browser session auth rather than GitHub App installation tokens / PAT API auth.