Gitlab CI/CD: File-type variable not available in Tag build when set to restricted

In the CI/CD settings of my project, I’ve configured a variable of type file. It has the protected flag set.
When my build runs for a tag, I would expect the file to be written with the content of the variable and the variable to be set to the path of that file.

This does not happen, unfortunately. The variable stays empty and afaict no file is written.

It works when I remove the protected flag from the variable.

Is this a bug in Gitlab or is the explanation for protected on the CI/CD settings page wrong?

  • Protected: Only exposed to protected branches or tags.

Thanks,
Chris

Ok, this is stupid of me. There are “protected tags” and “protected branches”.
So the protected flags applies not to all tags (as I initially understood) but to “proteced tags”, of course.

Maybe the hint could be improved like this:

Protected: Only exposed to protected branches or protected tags.