gh run view
查看工作流运行的摘要
gh run view [<run-id>] [flags]
Options
--exit-status
- Exit with non-zero status if run failed
-j
,--job <string>
- 查看一个特定的 job ID
-q
,--jq <expression>
- jq 表达式,过滤 JSON 输出
--json <fields>
- JSON 输出特殊字段
--log
- 查看 完整的日志
--log-failed
- 查看运行失败的日志
-t
,--template <string>
- 模板化输出
-v
,--verbose
- 展示 job 步骤
-w
,--web
- 浏览器打开
Options inherited from parent commands
-R
,--repo <[HOST/]OWNER/REPO>
- 使用 [HOST/]OWNER/REPO 格式,选择另一存储库
Examples
# 交互式查看
$ gh run view
# 查看特定的 run
$ gh run view 12345
# 查看特定的 job within a run
$ gh run view --job 456789
# 查看 job 的完整日志
$ gh run view --log --job 456789
# 若是 非零 返回,说明运行失败
$ gh run view 0451 --exit-status && echo "run pending or passed"