【问题标题】:Configure script to write content of config.log into stdout and/or stderr配置脚本以将 config.log 的内容写入标准输出和/或标准错误
【发布时间】:2022-12-18 08:49:06
【问题描述】:

有点复杂的情况:我正在尝试调试由 Maven 运行的配置脚本,该脚本在 Docker 容器内运行,由 GitHub Action 运行。它失败并要求我查看config.log。当然,我无权访问那个config.log(我可能应该以某种方式将它从容器中取出并保存到 GitHub 操作工件中,但这太长了......)有没有办法让它只写输出到 stdout/stderr 而不是 config.log?

【问题讨论】:

  • IMO,原始标签(C、C++、Automake)大多不合适。我认为 Docker、GitHub、Maven 比 C 或 C++ 更相关。

标签: docker maven github automake


【解决方案1】:

也可以打印文件的内容

在工作流程中试试这个:

steps:
  - name: Read config.log
    id: configlog
    uses: juliangruber/read-file-action@v1
    with:
      path: /path/to/config.log
  - name: Echo config.log
    run: echo "${{ steps.configlog.outputs.content }}"

【讨论】:

    猜你喜欢
    • 2014-07-22
    • 1970-01-01
    • 2020-04-12
    • 1970-01-01
    • 2014-12-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多