Set var according branch gitlab-ci

Hi!
I need some help. I want set specific variable according branch

ex:
to master variables:
DOCKER_REGISTRY: “my_harbor.fr”
DOCKER_REGISTRY_PROJET: “testesup”
DOCKER_REGISTRY_IMAGE_SRV: “testesup_srv”
DOCKER_REGISTRY_IMAGE_DB: “testesup_db”
DOCKER_BUILD_REF: “v0.0.1”
TEST_MA_VAR : ‘staging’
only: **
** -master

KANIKO_VERSION: “debug”

and my branch name’s test
variables:
DOCKER_REGISTRY: “harbor-registry.srv.u-bordeaux.fr
DOCKER_REGISTRY_PROJET: “testesup_prod”
DOCKER_REGISTRY_IMAGE_SRV: “testesup_srv_prod”
DOCKER_REGISTRY_IMAGE_DB: “testesup_db_prod”
DOCKER_BUILD_REF: “v0.0.1”
TEST_MA_VAR : ‘staging’
only: **
** - test

KANIKO_VERSION: “debug”