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.osCommon 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
- For workflow-level concurrency use github.ref or github.workflow.
- Move matrix-dependent grouping to job-level concurrency.
.github/workflows/ci.yml
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: trueHow to prevent it
- Pick a stable group key from the github context.
- Run actionlint, which validates concurrency expressions.
Related guides
GitHub Actions "Unrecognized named-value: secrets"Fix the GitHub Actions expression error "Unrecognized named-value: secrets" caused by using a context where i…
GitHub Actions "Context access might be invalid" (actionlint)Fix the actionlint warning "Context access might be invalid" for GitHub Actions caused by referencing a secre…
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…