How to limit a job in gitlab ci to a tag matching a pattern?
Only
accepts regex patterns so for your use case it would be:
only:
- /^V.*$/
except:
- branches
- triggers
Since only / except are now being deprecated, you should now prefer the rules
keyword
Things get pretty simple, here's the equivalent using rules:
rules:
# Execute only when tagged starting with V followed by a digit
- if: $CI_COMMIT_TAG =~ /^V\d.*/