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