Replace forbidden chars derived from branch name (#29)

Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMaxandCrazyMax authored and GitHub committed 2020-12-07 23:01:39 +00:00
1 parent 3ae5afe041
commit 7040b59aa5
5 files changed
+59 -2

No files matched your search

+1 -1
View File
@@ -83,7 +83,7 @@ export class Meta {
version.latest = this.inputs.tagLatest;
}
} 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';
}