Referencing Project environment variables in config.yml

I am trying to reference an environment variable that I’ve created in the Project from the workflow branches filter (specifically, trying to define the deploy branch based on the environment variable).

The config.yml section looks roughly like:

build-and-deploy:
  jobs:
    deploy:
      filters:
        branches:
          only: ______

and I have tried the following variations

only: $DEPLOY_BRANCH
only: ${DEPLOY_BRANCH}

is this even possible to accomplish?

1 Like

CircleCI 2.0 does not support variable interpolation in the config file. This approach might work better for you.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.