Section: Filters and concurrency

Set a job timeout

yaml
yaml
jobs:
  test:
    runs-on: ubuntu-latest
    timeout-minutes: 20
Explanation

Timeouts keep queues healthy and cap costs when a process hangs.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Filters and concurrency
Run only when selected paths change
Use `paths` to scope the workflow to files or directories.
OpenIn sheetyamlsame section
Ignore docs-only changes
Exclude paths that should not trigger CI.
OpenIn sheetyamlsame section
Cancel in-progress duplicate runs
Use concurrency groups to keep only the latest run active.
OpenIn sheetyamlsame section
Chain jobs with needs
Run a deploy only after tests succeed.
OpenIn sheetyamlsame section
Minimal workflow file
Basic YAML structure for a workflow.
Name a workflow clearly
Use a descriptive workflow name.