mirror of
https://code.forgejo.org/docker/metadata-action.git
synced 2025-08-02 15:58:31 +00:00
Allow to override flavor (#63)
Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
84b9e75d44
commit
1a678de43d
5 changed files with 53 additions and 76 deletions
|
@ -315,12 +315,12 @@ export class Meta {
|
|||
}
|
||||
|
||||
private setFlavor(val: string, tag: tcl.Tag): string {
|
||||
if (tag.attrs['prefix'].length > 0) {
|
||||
if (tag.attrs.hasOwnProperty('prefix')) {
|
||||
val = `${tag.attrs['prefix']}${val}`;
|
||||
} else if (this.flavor.prefix.length > 0) {
|
||||
val = `${this.flavor.prefix}${val}`;
|
||||
}
|
||||
if (tag.attrs['suffix'].length > 0) {
|
||||
if (tag.attrs.hasOwnProperty('suffix')) {
|
||||
val = `${val}${tag.attrs['suffix']}`;
|
||||
} else if (this.flavor.suffix.length > 0) {
|
||||
val = `${val}${this.flavor.suffix}`;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue