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

标签 github github-actions

有没有办法将 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/

相关文章:

gradle - Github Actions VM和本地中不同的gradle输出

aws-cloudformation - GitHub 操作 : Deleting stack in AWS returns Waiter StackDeleteComplete failed: Max attempts exceeded

azure - 带有 "az webapp deployment source config-zip"的部署 Azure Web 应用程序无法正常工作

api - GitHub API : Get email addresses of all members of organization

python - 在我的 Mac 上哪里可以找到我的 git 克隆存储库?

svn - svn2git错误:[svn远程“svn”]未知

GitHub for Mac 每次启动时 pop "enter your password for the ssh key id_rsa"

Heroku 上的 Java 网络应用程序 : Unable to access jarfile

javascript - 无法使用 webpack 在 GitHub Actions 中为生产构建

amazon-web-services - 通过 Github 操作部署 AWS ECS 任务定义时出现授权错误