Interview Prep/GitHub Actions/Workflow Anatomy & Execution Model

What is `timeout-minutes` and what are the default limits?

BeginnerConceptWorkflow Anatomy & Execution Model
Answer

timeout-minutes cancels a job or step that exceeds the limit. The default job timeout is 360 minutes (6 hours) on hosted runners, which is the maximum there; self-hosted jobs can run up to 5 days. A workflow run can last at most 35 days including waiting for approvals. We always set an explicit short job timeout (for example 15 to 30 minutes): a hung test burning 6 hours of minutes on every run is a common cost leak.

All GitHub Actions questions Roadmap: GitHub Actions

More on Workflow Anatomy & Execution Model