github-action/valid-timeout-minutes
Disallow invalid timeout-minutes.
- 🔧 The
--fixoption on the command line can automatically fix some of the problems reported by this rule.
📖 Rule Details
This rule reports when jobs or steps has invalid timeout-minutes.
yaml
jobs:
unit-test:
steps:
- timeout-minutes: 20correct
yaml
jobs:
unit-test:
timeout-minutes: 0yaml
jobs:
unit-test:
timeout-minutes: -2yaml
jobs:
unit-test:
timeout-minutes: 2.3yaml
jobs:
unit-test:
steps:
- timeout-minutes: 30incorrect
🔧 Options
ts
type TimeoutMinutesRange = {
min?: number
max?: number
}
type ValidTimeoutMinutesOptions = [
| number
| TimeoutMinutesRange
| {
job?: number | TimeoutMinutesRange
step?: number | TimeoutMinutesRange
},
]Default options is set to { min: 1, max: 360 }.
🚀 Version
This rule was introduced in eslint-plugin-github-action v0.0.16