Replace forbidden chars derived from branch name (#29)

This commit is contained in:
CrazyMax 2020-12-07 19:56:50 +01:00
parent 3ae5afe041
commit 5aafc35dc7
No known key found for this signature in database
GPG key ID: 3248E46B6BB8C7F7
4 changed files with 54 additions and 2 deletions

2
dist/index.js generated vendored
View file

@ -242,7 +242,7 @@ class Meta {
}
}
else if (/^refs\/heads\//.test(this.context.ref)) {
version.main = this.context.ref.replace(/^refs\/heads\//g, '').replace(/\//g, '-');
version.main = this.context.ref.replace(/^refs\/heads\//g, '').replace(/[^a-zA-Z0-9._-]+/g, '-');
if (this.inputs.tagEdge && this.inputs.tagEdgeBranch === version.main) {
version.main = 'edge';
}