CI_COMMIT_REF_SLUG is not safe to name docker image because of pass multiply '-'
<!--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=27401)
</details>
<!--IssueSummary end-->
```
# .gitlab-ci.yaml
...
variables:
BUILD_TARGET: bcoin
IMAGE_NAME: ${CI_REGISTRY_IMAGE}/${CI_COMMIT_REF_SLUG}-issue/api_php
before_script:
- docker info
- echo "$CI_JOB_TOKEN" | docker login -u gitlab-ci-token <my_gitlab> --password-stdin
script:
- docker build --pull -t ${IMAGE_NAME} --target=$BUILD_TARGET $BUILD_CONTEXT
- docker push ${IMAGE_NAME}
...
```
If i have more than one MergeRequest for issue with non-ASCII title, it generates branch with name like `432--2` (fist branch is `432-`)
`<my_gitlab>/<group>/<project>/432--2-issue/api_php` - this name is valid for local registry on build host.
But, if i'll try to push it to self-hosted gitlab registry, **my build host will be banned by ip**. Forever. It`s pain. Epic fail!
I am an gitlab sysadmin and i can resolve it: https://docs.gitlab.com/ee/security/rack_attack.html#remove-blocked-ips-from-rack-attack-via-redis
But what about others regular developers? What about cloud gitlab? Imho:
1) quiet unlimited ban is too angry protection
2) SLUG shoud replace multiply '-' to one everywhere. `432--2` to `432-2`
issue