Prevent tagging when associated pipeline is failing
<!--IssueSummary start-->
<details>
<summary>
Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards.
</summary>
- [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=18525)
</details>
<!--IssueSummary end-->
### Description
As requested by customer:
> I am looking for a way to make tags fail if the previous pipeline on the target branch has failed.
> Tags usually represent a stable point of the project but at the moment we can tag any branch even if the pipeline for the target branch has failed. I would like to see an option in the project settings to enable this check:
> Tag is only successful if the previous pipeline on the target branch finished successfully.
### Proposal
If the most recent pipeline for current branch is in a failed state, then forbid any tags being applied to this branch.
Should be configurable under project settings.
### Links / references
ZD: https://gitlab.zendesk.com/agent/tickets/78955
### Documentation blurb
1. Why should someone use it; what's the underlying problem.
- This feature would prevent tags such as release versions being applied to failed builds.
2. What is the solution.
- Project setting that will forbid new tags being applied when most recent pipeline in a failed state.
3. How does someone use this
- Configurable option that's applied at a project level
During implementation, this can then be copied and used as a starter for the documentation.)
issue