gpt4 book ai didi

github - 在 GitHub Actions 中将步骤设置为超时成功

转载 作者:行者123 更新时间:2023-12-04 03:45:09 26 4
gpt4 key购买 nike

有没有办法将 GitHub 操作中的步骤超时声明为“成功的工作”?我想构建一个可执行文件并运行它几分钟——如果它没有崩溃,管道应该告诉我测试通过/成功。在 bash 中使用诸如超时之类的东西当然是可能的 - 但我正试图找出一个跨平台的解决方案,因此试图通过“纯 Action ”来实现这一点。

最佳答案

超时成功的作业示例。

      - name: no timeout
run: timeout 10 python ./sleep.py || code=$?; if [[ $code -ne 124 && $code -ne 0 ]]; then exit $code; fi

查看此 example reporelated answer .

关于github - 在 GitHub Actions 中将步骤设置为超时成功,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65307781/

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