I just noticed that tags can’t use variables expansion like for example;
job: environment: name: "$CI_COMMIT_REF_NAME" tags: - "$CI_COMMIT_REF_NAME"
Wouldn’t that be a great feature? Because then I could just use CI_COMMIT_REF_NAME the whole way from branch, to environment and to the runner running in that environment.
Makes sense to me, I’m surprised no one has suggested it.
Any other way to dynamically select the runner based on the branch name? I have public repos with private branches where this feature would be very helpful. I always want to share my code so everything I write for work is public, but it always has a private branch in our internal Gitlab.
So if I could use variables in tags I could have the same job template in the public branch as I do in the private branch.
Is perhaps an alternative solution to include something in the job file, so the include can be different based on if I’m in a public repo or in a private repo?