gpt4 book ai didi

GitHub 操作 : How to access to the log of current build via Terminal

转载 作者:行者123 更新时间:2023-12-03 23:47:13 25 4
gpt4 key购买 nike

我正在努力熟悉 Github Actions。我以某种方式配置了我的工作流程,每次我将代码推送到 GitHub 时,代码都会自动构建并推送到 heroku。
如何在不访问 github.com 的情况下访问终端中的构建日志信息?

最佳答案

与最新 cli/cli tool named gh (1.9.0+),你可以简单地做
(从你的终端,不去 github.com ):

gh run view <jobId> --log 
# or
gh run view <jobId> --log-failed
见“ Work with GitHub Actions in your terminal with GitHub CLI

With the new gh run list, you receive an overview of all types of workflow runs whether they were triggered via a push, pull request, webhook, or manual event.

To drill down into the details of a single run, you can use gh run view, optionally going into as much detail as the individual steps of a job.

For more mysterious failures, you can combine a tool like grep with gh run view --log to search across a run’s entire log output.

If --log is too much information, gh run --log-failed will output only the log lines for individual steps that failed.
This is great for getting right to the logs for a failed step instead of having to run grep yourself.

关于GitHub 操作 : How to access to the log of current build via Terminal,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61954361/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com