Skip to content
Latchkey

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

  1. Set timeout-minutes to a bare number.
  2. For expressions, ensure they evaluate to a number via fromJSON if needed.
.github/workflows/ci.yml
jobs:
  build:
    runs-on: ubuntu-latest
    timeout-minutes: 30

How to prevent it

  • Document that timeout-minutes is an integer count of minutes.
  • Run actionlint to validate numeric fields.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →