GitHub Actions "Invalid format" for timeout-minutes
timeout-minutes must be a number. A quoted string, a unit suffix, or an expression yielding a non-number is rejected.
What this error means
The workflow fails validation at timeout-minutes with an invalid format message.
github-actions
The workflow is not valid. .github/workflows/ci.yml (Line: 8): Invalid format for 'timeout-minutes': '30m'Common causes
A unit suffix
timeout-minutes is already in minutes, so values like 30m or 1h are invalid.
A non-numeric expression result
An expression that returns a string instead of a number fails the format check.
How to fix it
Use a plain integer of minutes
- Set timeout-minutes to a bare number.
- For expressions, ensure they evaluate to a number via fromJSON if needed.
.github/workflows/ci.yml
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 30How to prevent it
- Document that timeout-minutes is an integer count of minutes.
- Run actionlint to validate numeric fields.
Related guides
GitHub Actions "Unable to interpret value as a boolean"Fix the GitHub Actions error "Unable to interpret value as a boolean" caused by passing a string expression w…
GitHub Actions "Invalid type" for env or with valuesFix the GitHub Actions "Invalid type" error for env or with values caused by passing a list or mapping where…
GitHub Actions "The template is not valid" expression evaluation errorFix the GitHub Actions "The template is not valid" runtime expression evaluation error caused by a function o…