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
Describe the feature or problem you’d like to solve
When trigger a GitHub action workflow dispatch with gh workflow run, I always want to watch it.
Currently I can do gh run list find the ID and then gh run watch $Id or gh run watch and select the one I just triggered.
Proposed solution
add option gh workflow run --watch that automatically does this.
Reacted by Mislav Marohnić, Alessandro Dal Grande, Darlin Alberto, Philippe Blain, Judson Lester, Steffen Reuther, Kyle, zntfdr, Murray Tait, Petr Ruzicka and 26 more
I agree I think this is a common use case and we should support it. I am going to mark this as core as we will want to discuss options on what we want the UX to look like for this feature.
Reacted by Kyle, Jake Lundberg and Sergey Semushin
Reacted by Alessandro Dal Grande and Jake Lundberg
I'd definitely love a gh workflow run -w option to bring up the browser to watch the run.
Terminal would be cool too, but I'd want to see the detailed output rather than the summary provided by gh run watch today.
For the time being I think this will probably be good enough since the top entry in run view is usually the one I just triggered. Posting incase it helps anyone else:
gh workflow run (run args); sleep 5; gh run view -w
I hacked up a workaround for this that works well enough locally: mik3y@6359338
It works by polling the the list of runs before and after, then selecting the first newly-appearing run. This is naturally a bit brittle due to #4001, though is already saving me plenty of time.
I'm happy to PR the code, with any suggested improvements, if something like this would be acceptable.
@mik3y I'd recommend getting the PR open since it'll at least provide an easy point of discussion. It's a nice idea, but ultimately up to the gh maintainers to proceed in the face of #4001 or not.
gh workflow run Sql-CreateNorthwindDb.yaml --field DB_IP="*" --field DB_NAME="*" --field MINI_VERSION="true"&& sleep 5 && \
gh run list --workflow=Sql-CreateNorthwindDb.yaml --json databaseId --limit 1 | jq '.[].databaseId'| \
xargs gh run watch
can probably be wrapped in a function.
will break if multiple people run it at same time.
if anyone knows how to relibly get the id of the run I just launched that would be best.
Activity
samcoe commentedon May 3, 2021
I agree I think this is a common use case and we should support it. I am going to mark this as
coreas we will want to discuss options on what we want the UX to look like for this feature.[-][Feature Request] - add option to watch in workflow run[/-][+]Add option to watch workflow run progress[/+]mislav commentedon Jun 27, 2022
Currently blocked on #4001
matschaffer-roblox commentedon Jan 17, 2023
I'd definitely love a
gh workflow run -woption to bring up the browser to watch the run.Terminal would be cool too, but I'd want to see the detailed output rather than the summary provided by
gh run watchtoday.For the time being I think this will probably be good enough since the top entry in
run viewis usually the one I just triggered. Posting incase it helps anyone else:feature: add `--watch` option to `gh workflow run`
mik3y commentedon Jan 20, 2023
I hacked up a workaround for this that works well enough locally: mik3y@6359338
It works by polling the the list of runs before and after, then selecting the first newly-appearing run. This is naturally a bit brittle due to #4001, though is already saving me plenty of time.
I'm happy to PR the code, with any suggested improvements, if something like this would be acceptable.
matschaffer-roblox commentedon Feb 2, 2023
@mik3y I'd recommend getting the PR open since it'll at least provide an easy point of discussion. It's a nice idea, but ultimately up to the
ghmaintainers to proceed in the face of #4001 or not.feature: add `--watch` option to `gh workflow run`
mik3y commentedon Feb 4, 2023
Done, I've PR'd the hack here: #6965
Yarden-zamir commentedon Feb 22, 2023
My workaround is this :
can probably be wrapped in a function.
will break if multiple people run it at same time.
if anyone knows how to relibly get the id of the run I just launched that would be best.
feature: add `--watch` option to `gh workflow run`
jglick commentedon Feb 18, 2026
Does #12695 now unblock this?