GitHub Actions concurrency Group Expression Evaluated Too Early
A concurrency.group expression references a context that is not available where concurrency is evaluated, or resolves to an empty string, so the workflow fails to compile or groups unrelated runs into one bucket.
What this error means
The workflow is rejected with an unrecognized named-value in the concurrency block, or unrelated runs cancel each other because the group key evaluated to the same empty value.
concurrency:
group: deploy-${{ steps.meta.outputs.env }} # steps not available at workflow level
cancel-in-progress: trueCommon causes
Context not available at the concurrency level
Workflow-level concurrency is evaluated early. The steps, job, and matrix contexts do not exist there; only github, inputs, vars, and similar are available.
Group key resolves to empty
If the expression yields an empty string, every run shares the same empty group and contends, cancelling each other unexpectedly.
How to fix it
Use a context available at that level
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: trueMove dynamic grouping to job level
- Job-level concurrency can use the matrix context for per-combination groups.
- For workflow-level grouping, stick to github, inputs, and vars contexts.
- Ensure the group expression never collapses to an empty string.
How to prevent it
- Key concurrency on github.workflow plus github.ref by default.
- Use only contexts available at the level where concurrency is declared.
- Verify the group key is always non-empty and meaningfully unique.