Different CI/CD for Self Hosted and gitlab.com

How would I have 2 different CI scripts for a self hosted instance and gitlab.com when using repo mirroring?

The self hosted repo is push mirrored to gitlab.com, but the CI script requires different variables (such as different docker hosts) between self-hosted and gitlab.com.

So I need it to use one set of variables when self-hosted, and one set of variables in gitlab.com.