How to tag docker image same as the branch name in dockerhub build

  docker, dockerhub, tags

Need help on how to set the image tag the same as the branchname. In the below image I selected branch.

Now in the source, I want to add any branch name for example xyz or feature/xyz and docker tag should be xyz and feature-xyz

enter image description here

tried some regex but didn’t worked

Source: Docker Questions