The include keyword does not parse CI variables

Problem to solve

The include keyword in the CI accepts a path to a local/remote ci yml file. Unfortunately the path is not parsing the CI variables, like $CI_PROJECT_NAME or $CI_COMMIT_REF_NAME.

Further details

(Include use cases, benefits, and/or goals)

I have a gitlab group with hundreds of repositories and I would like to use the same CI script when the CI for a specific branch is running. In my workflow all projects that have the same branch name use the same script. If the include keyword had support for CI variables I could easily use one script

include: 'https://fileserver/$CI_COMMIT_REF_NAME/custom-gitlab-ci.yml'

for all of my projects that have this specific workflow. In general I do not understand why it is not the default behavior.

Proposal

Make include keyword parse CI variables mentioned in the include path.

What does success look like, and how can we measure that?

(If no way to measure success, link to an issue that will implement a way to measure this)

If you can successfully have a path like

include: 'https://fileserver/$CI_COMMIT_REF_NAME/custom-gitlab-ci.yml'

in your ci file.

Links / references