GitHub动作工作的一般超时

发布于 2025-02-13 16:18:03 字数 491 浏览 0 评论 0 原文

我知道可以使用Proprety 超时分钟为单个作业设置超时。

例如:

name: Spawn cluster

on:
  workflow_dispatch:
  schedule:
    - cron:  '0 */12 * * *'
jobs:
  build:
    runs-on: ubuntu-latest
    timeout-minutes: 600
    steps:
    - name: CHECKOUT
      uses: actions/checkout@v2
    - name: AZURE LOGIN
      uses: azure/login@v1
      with:
        creds: ${{secrets.AZURE_CREDENTIALS}}

但是,就我而言,有成千上万的工作定义,这种方法确实很难实施。

是否有某种方法可以为我的自托管代理中的所有工作配置一般的超时门槛?

I know that it is possible to set a timeout for individual jobs using the proprety timeout-minutes.

For example:

name: Spawn cluster

on:
  workflow_dispatch:
  schedule:
    - cron:  '0 */12 * * *'
jobs:
  build:
    runs-on: ubuntu-latest
    timeout-minutes: 600
    steps:
    - name: CHECKOUT
      uses: actions/checkout@v2
    - name: AZURE LOGIN
      uses: azure/login@v1
      with:
        creds: ${{secrets.AZURE_CREDENTIALS}}

However in my case, with thousand of jobs definitions, this approach is really hard to implement.

Is there some way to configure a general timeout threshold for all my jobs in my self-hosted agent?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

记忆之渊 2025-02-20 16:18:05

不幸的是,目前这是不可能的。您只能设置超时 nofollow noreferrer“> step level 。但是,无法为完整的工作流或几个工作流程设置超时。但是,已经存在在Github上进行了一个开放的讨论

Unfortunately, this is not possible at the moment. You can only set the timeout individually at job and step level. However, the timeout can't be set for a complete workflow or several workflows. However, there is already an open discussion about this on GitHub.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文