Push the image with tag (#6504)

This commit is contained in:
Maurizio Vitale
2021-01-07 14:13:35 +00:00
committed by GitHub
parent 2047ba09fa
commit b54f1480bf

View File

@@ -51,9 +51,9 @@ function tagImagePerform(args: PublishArgs, tagImage: string, newTag: string) {
logger.info(response);
}
function pushImagePerform(args: PublishArgs) {
logger.info(`Perform docker push... ${args.dockerRepo} --all-tags`);
const response = exec('docker', ['push', `${args.dockerRepo}`, `--all-tags`], {});
function pushImagePerform(args: PublishArgs, tag: string) {
logger.info(`Perform docker push... ${args.dockerRepo}:${tag}`);
const response = exec('docker', ['push', `${args.dockerRepo}:${tag}`], {});
logger.info(response);
}
@@ -102,10 +102,9 @@ function main(args) {
buildImagePerform(args, mainTag);
}
tagImagePerform(args, mainTag, tag);
logger.info(`tag:${tag} done`);
pushImagePerform(args, tag);
}
});
pushImagePerform(args);
logger.info(`Clean the image with tag:${mainTag} ...`);
cleanImagePerform(args, mainTag);
} else {