我有一个长期运行的 GitHub 工作流程(10 小时)。即使我在作业中配置了超时分钟数,它也会在 6 小时内取消。有限制吗?
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}}
最佳答案
是的,还有some limits
Job execution time - Each job in a workflow can run for up to 6 hours of execution time. If a job reaches this limit, the job is terminated and fails to complete.
Workflow run time - Each workflow run is limited to 72 hours. If a workflow run reaches this limit, the workflow run is cancelled.
API requests - You can execute up to 1000 API requests in an hour across all actions within a repository. If exceeded, additional API calls will fail, which might cause jobs to fail.
Concurrent jobs - The number of concurrent jobs you can run in your account depends on your GitHub plan, as indicated in the following table. If exceeded, any additional jobs are queued.
因此,您需要运行 10 个小时的工作才能获得成功 self-hosted agent .或者尝试将其拆分为更小的块。
关于Github 操作作业超时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68187987/