Added support for semverPrefix

This commit is contained in:
Lorenzo Bernardi 2020-11-04 20:10:27 +01:00 committed by GitHub
parent 2480e1e23e
commit 394db5824b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -82,10 +82,10 @@ export class Meta {
const minor: number = semver.minor(semver.coerce(version.version));
const patch: number = semver.patch(semver.coerce(version.version));
const prerelease: string[] | null = semver.patch(version.version);
tags.push(`${image}:${major}`);
tags.push(`${image}:${major}.${minor}`);
tags.push(`${image}:${this.inputs.semverPrefix}${major}`);
tags.push(`${image}:${this.inputs.semverPrefix}${major}.${minor}`);
if(prerelease !== null) {
tags.push(`${image}:${major}.${minor}.${patch}`);
tags.push(`${image}:${this.inputs.semverPrefix}${major}.${minor}.${patch}`);
}
}
if (version.latest) {