mirror of
https://github.com/docker/metadata-action.git
synced 2026-01-20 21:08:56 +08:00
Replace forbidden chars derived from branch name (#29)
This commit is contained in:
parent
3ae5afe041
commit
5aafc35dc7
4 changed files with 54 additions and 2 deletions
2
dist/index.js
generated
vendored
2
dist/index.js
generated
vendored
|
|
@ -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';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue