Skip to content
Latchkey

GitHub Actions concurrency group expression error

The concurrency.group value is computed from an expression that failed to parse or referenced a context not available at that scope.

What this error means

The workflow is rejected at the concurrency key with an expression or unrecognized named-value error.

github-actions
The workflow is not valid. .github/workflows/ci.yml (Line: 5): Unrecognized named-value: 'matrix'. Located at position 1 within expression: matrix.os

Common causes

Context unavailable at the group scope

Workflow-level concurrency cannot use matrix or job contexts; only github, inputs, vars, and similar are available.

Malformed expression

A missing brace or bad operator in the group expression fails to parse.

How to fix it

Use only contexts valid at that scope

  1. For workflow-level concurrency use github.ref or github.workflow.
  2. Move matrix-dependent grouping to job-level concurrency.
.github/workflows/ci.yml
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

How to prevent it

  • Pick a stable group key from the github context.
  • Run actionlint, which validates concurrency expressions.

Related guides

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