Choose a runner by project variable

Runner choice

Hi everyone,

I want to know if someone of you can choose a specific runner for a job by a project variable which is define in Settings → CI/CD → Variables section?

My problem is like that:

.gitlab-ci.yml content

stages:
  - generation
  - build

image_generation:
  image: gcc
  tags:
    - $GITLAB_RUNNER
  script:
    - g++ test.cpp -o test

My GITLAB_RUNNER is defined as project variable. But when I try to retrieve its in tags section to choose a special runner, the value does not taken in count. I haven’t got shared-runner as value (runner tag when it was created) but I have got $GITLAB_RUNNER.

Does anyone know how I can retrieve the good value?

Thanks.

TontonAldo