-
Notifications
You must be signed in to change notification settings - Fork 10
Description
Describe the bug
The on_push_tag.yaml workflow currently triggers and creates a pull request to update the version, even when the pushed tag does not conform to the expected tag format (e.g., non-semver or irrelevant tags). This can result in unnecessary or erroneous version updates.
Environment
OS: [e.g. Ubuntu 22.04]Browser: [e.g. Chrome 123]Python Version: [e.g. 3.11]- GitHub Actions
To Reproduce
Steps to reproduce the behavior:
- Push a tag that does not match the expected version pattern (e.g.,
random-tag,test123, etc.) - Observe that the GitHub Action
on_push_tag.yamlstill runs - A pull request is created to update the version based on this invalid tag
Codes, Stack Traces or Screenshots
See #99 and https://github.com/hmasdev/pyjpboatrace/actions/runs/14645345522
Expected behavior
The workflow should validate the tag format before proceeding. If the tag does not match the expected pattern (e.g., vMAJOR.MINOR.PATCH), it should skip execution and avoid creating a PR.
Problems
If this bug is not fixed:
- Versioning logic may become inconsistent
- Unintended PRs may clutter the repository
- Automation trustworthiness may be reduced
Reasons (Optional)
Possible cause: The current workflow lacks a tag pattern check before executing PR creation logic.
Additional context
Consider adding a conditional check early in the workflow to validate the tag name using a regex (e.g., ^v\d+\.\d+\.\d+$) before proceeding with any version updates.