How to use Tags to switch the version of the cicd configuration file & what is the format to set?

Hi everyone, I need to use Tags to mark the different version of the cicd configuration file. For example, my cicd configuration file: java-ci.yml is attached with Tag: v1, v2, v3.

When I run the pipeline, sometimes I need to use the previous java-ci.yml file, version - v2, or v1. My question is, what is the format that I can set under here(pls see pic below)? so that the cicd configuration files can switch between different versions easily by using the Tag?

Does Gitlab have such a function? Thanks!