Add tag format validation to prevent invalid tags from triggering version update workflow#114
Draft
Add tag format validation to prevent invalid tags from triggering version update workflow#114
Conversation
…kflow Co-authored-by: hmasdev <73353463+hmasdev@users.noreply.github.com>
Co-authored-by: hmasdev <73353463+hmasdev@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix CI/CD workflow to validate tag format before update
Add tag format validation to prevent invalid tags from triggering version update workflow
Dec 5, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Template
Abstract
Adds upfront validation to
on_push_tags.yamlto reject tags that don't matchvMAJOR.MINOR.PATCHformat, preventing erroneous version update PRs.Objective
The workflow was triggering on any tag matching
*.*.*(e.g.,random-tag,test.test.test,1.0.0), creating spurious version update PRs and reducing CI/CD reliability.Type of change
What you did
check-tag-formatjob with regex validation^v[0-9]+\.[0-9]+\.[0-9]+$validate-versiondepend oncheck-tag-formatto enforce validation orderChanges
Workflow structure:
Tag validation results:
v1.0.0,v0.5.0,v10.20.30random-tag,test123,1.0.0,v1.0,v1.0.0-alpha,test.test.testImpacts
vprefix trigger version updatesOperation check
Push tags to verify behavior:
Expected: Invalid tags exit workflow immediately with clear error message; valid tags proceed through full workflow.
Problems
None. Validation logic is straightforward regex match with no dependencies on external state.
Additional context
Addresses issue where workflow run triggered by non-semver tags (see referenced workflow run 14645345522). Solution maintains backward compatibility—all previously valid tags remain valid.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.