mirror of
https://code.forgejo.org/docker/metadata-action.git
synced 2025-08-27 00:10:55 +00:00
Allow to disable latest tag (#23)
Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
4c2760ba7a
commit
9de4428611
7 changed files with 35 additions and 20 deletions
|
@ -57,7 +57,7 @@ export class Meta {
|
|||
if (semver.prerelease(version.main)) {
|
||||
version.main = handlebars.compile('{{version}}')(sver);
|
||||
} else {
|
||||
version.latest = true;
|
||||
version.latest = this.inputs.tagLatest;
|
||||
version.main = handlebars.compile(this.inputs.tagSemver[0])(sver);
|
||||
for (const semverTpl of this.inputs.tagSemver) {
|
||||
const partial = handlebars.compile(semverTpl)(sver);
|
||||
|
@ -77,10 +77,10 @@ export class Meta {
|
|||
}
|
||||
if (tagMatch) {
|
||||
version.main = tagMatch[this.inputs.tagMatchGroup];
|
||||
version.latest = this.inputs.tagMatchLatest;
|
||||
version.latest = this.inputs.tagLatest;
|
||||
}
|
||||
} else {
|
||||
version.latest = this.inputs.tagMatchLatest;
|
||||
version.latest = this.inputs.tagLatest;
|
||||
}
|
||||
} else if (/^refs\/heads\//.test(this.context.ref)) {
|
||||
version.main = this.context.ref.replace(/^refs\/heads\//g, '').replace(/\//g, '-');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue