184

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

319

You can change default time limit in two ways

Your scenario:

my-job:
 runs-on:         ubuntu-latest
 timeout-minutes: 30
Sign up to request clarification or add additional context in comments.

5 Comments

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.
Is there a way to limit whole action?
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.
@DanielKaplan that link you posted shows that you cannot default per workflow
@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.

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.