Is there a way to run specific jobs based on an HTTP call response to Jira?

I’d like to run a specific set of Jobs/Stages in Gitlab based on the Components a branch is affecting.

For example, our developers have the convention to Add a Jira ID into the branch name, that way I’d like to do an HTTP call to Jira and get some metadata, now based on that metadata I’d like to probably “inject” environment variables.

And now that it has environment variables I could just use the " rules" https://docs.gitlab.com/ee/ci/yaml/#rules feature in order to filter out some Jobs.

But so far I cannot inject env variables, is there a way that I can accomplish this?