Run pipeline only on a specific gitlab instance

I’m using the Gitlab-CI to test and release a python lib.

I’m however pushing this repo to gitlab.com and another gitlab instance. As expected the gitlab-ci.yml triggers on both gitlab instances.

How can I filter what stage or what jobs are run depending on what instance of gitlab it’s run on?

I my case I only want to run the release stage on one specific gitlab instance for tags with the pattern vVERSION, which works.

But I couldn’t find a only: flag for a gitlab instance. This should be the second condition for triggering this stage.

thanks for your help.

Since this might be helpful for someone:
I found a solution:

...
  only:
    refs:
      - /^v\d+\.\d+\.\d+([abc]\d*)?$/ # PEP-440 compliant
    variables:
      - $CI_SERVER_HOST == "gitlab.example.org"
...

the check for the CI_SERVER_HOST variable essentially let’s you know what gitlab instance is running the pipeline.