Allow global prefix/suffix on latest

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2021-07-05 20:37:02 +02:00
parent aa7478bca1
commit 375e313280
7 changed files with 245 additions and 59 deletions

View File

@@ -159,7 +159,6 @@ export class Meta {
vraw = this.context.ref.replace(/^refs\/tags\//g, '').replace(/\//g, '-');
}
let latest: boolean = false;
let tmatch;
const isRegEx = tag.attrs['pattern'].match(/^\/(.+)\/(.*)$/);
if (isRegEx) {
@@ -304,7 +303,7 @@ export class Meta {
tags.push(`${imageLc}:${partial}`);
}
if (this.version.latest) {
tags.push(`${imageLc}:latest`);
tags.push(`${imageLc}:${this.flavor.prefixLatest ? this.flavor.prefix : ''}latest${this.flavor.suffixLatest ? this.flavor.suffix : ''}`);
}
}
return tags;