Skip to content
Latchkey

GitHub Actions matrix job "reserved characters in name"

Job and matrix-derived names render into the run UI and APIs. Certain control or reserved characters in a computed name cause validation or display failures. Keep names to plain text and safe punctuation.

What this error means

A matrix job with a name built from interpolated values fails validation or renders incorrectly because the value contains reserved characters.

github-actions
Invalid workflow file: .github/workflows/ci.yml#L30
The job name contains invalid characters.

Common causes

Interpolated value has control/reserved characters

A matrix dimension injected into name includes characters not allowed in job names.

Unsanitized external input in name

A name built from arbitrary data contains characters that break rendering.

How to fix it

Sanitize the job name

  1. Build the name from safe matrix values only.
  2. Replace or strip reserved characters before using them in name.
  3. Prefer a stable readable label over raw interpolated input.
.github/workflows/ci.yml
strategy:
  matrix:
    os: [ubuntu-latest, windows-latest]
name: build-${{ matrix.os }}

How to prevent it

  • Keep job names to letters, numbers, dashes, and spaces.
  • Avoid interpolating arbitrary external data directly into job names.

Frequently asked questions

What causes "Invalid characters in job name"?
A matrix dimension injected into name includes characters not allowed in job names.
How do I fix Invalid characters in job name?
Sanitize the job name

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card