156

Normally, my pipelines take 15 minutes to execute.

Recently, for some strange reasons, some pipelines take between 45 minutes and 6 hours to fail.

Is it possible to set a default timeout limit on GitHub Action's pipeline (for example, auto cancel after 30 minutes)?

1 Answer 1

280

You can change default time limit in two ways

Your scenario:

my-job:
 runs-on:         ubuntu-latest
 timeout-minutes: 30
5
  • 38
    If I have many repos and each repo has many actions, it will be very difficult to apply this setting manually on every action. Is there an org level setting, so that the Org Admin can set it and it will get applied for each action in each repo belonging to that org? That way, the Org Admin can control it for all the repos from a central location.
    – Ven
    Commented Apr 22, 2021 at 7:22
  • 1
    Is there a way to limit whole action? Commented Oct 27, 2021 at 20:14
  • 2
    Even I have the same problem as @Ven I have many repos and want to change this setting at org level, rather than depending upon my devs to do that for their repos. As of now this is clogging my runners. Commented Jan 4, 2023 at 5:22
  • @DanielKaplan that link you posted shows that you cannot default per workflow
    – hraban
    Commented Dec 30, 2023 at 23:39
  • 1
    @hraban hm. My original comment was, You can default per workflow: github.community/t/cannot-set-default-timeout-minutes/118164 This was a few years ago so I'm not sure why I said or linked to this at the time. Perhaps it was an unfortunate typo and I meant to say "cann't" instead of "can." I'll delete my original comment since it's a red herring. Commented Dec 31, 2023 at 2:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.