Last active
March 3, 2023 21:40
-
-
Save lucasmelin/43a4df2de4e5498ad3706da72a8c1197 to your computer and use it in GitHub Desktop.
Find and watch in-progress GitHub Actions workflow runs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
workflow=$(gh workflow list | fzf | cut -f1) && | |
gh api user \ | |
| jq -r '.login' \ | |
| xargs -I {} gh run list -u {} -w $workflow -b main --json name,number,status,displayTitle,databaseId \ | |
--template '{{tablerow "ID" "Title" "Run number"}}{{range .}}{{if eq .status "in_progress"}}{{tablerow .databaseId .displayTitle (printf "#%v" .number)}}{{end}}{{end}}' \ | |
| fzf --header-lines=1 \ | |
| cut -w -f1 \ | |
| xargs -I {} gh run watch {} --exit-status | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment