CI: concurrency groups that mention github.ref all collapse into one group per ref #1
- @ogirardot opened this issue · 5d agoedited
Two workflows in the same repo with different concurrency groups that both use the
${{ github.ref }}idiom cancel each other.Observed on rickub/cli:
ci.ymlhasgroup: ci-${{ github.ref }}and a newsecurity.ymlhadgroup: security-${{ github.ref }}, bothcancel-in-progress: true. On one push tomain, the Security run started and CI run #15 was cancelled with no reason shown (RC, whose group is the literalrc, was unaffected).Cause (
web/ci_dispatch.go,concurrencyGroup): any raw group containing the substringgithub.refis replaced by"ref:" + ref, discarding the rest of the expression. Soci-…,security-…, and even${{ github.workflow }}-${{ github.ref }}all become the same key. GitHub substitutes the expression inside the string instead, so the prefixes keep the groups distinct.Expected: substitute
${{ github.ref }}(andgithub.ref_name,github.workflow, …) within the group string rather than collapsing the whole group to the ref, or at minimum key the group on<workflow>+ ref.Workaround used in rickub/cli: a verbatim group name per workflow.
- @ogirardot · 5d agoedited
Moved to rickub/rickub#192 (the server repo); closing here.
Sign in to comment.