mirror of
https://code.forgejo.org/docker/metadata-action.git
synced 2025-09-15 17:27:00 +00:00
Allow global prefix/suffix on latest
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
aa7478bca1
commit
375e313280
7 changed files with 245 additions and 59 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue