Add --quiet flag to push, add success msg

Signed-off-by: Tim Etchells <tetchell@redhat.com>
This commit is contained in:
Tim Etchells 2020-11-17 19:00:31 -05:00
parent 61095317bf
commit e91c7f612e
4 changed files with 10 additions and 12 deletions

View file

@ -35,10 +35,11 @@ export async function run(): Promise<void> {
// push image
const registryUrl = `${registry.replace(/\/$/, '')}/${imageToPush}`;
const push: CommandResult = await execute(podman, ['push', '--creds', `${username}:${password}`, `${imageToPush}`, `${registryUrl}`]);
const push: CommandResult = await execute(podman, ['push', '--quiet', '--creds', `${username}:${password}`, `${imageToPush}`, `${registryUrl}`]);
if (push.succeeded === false) {
return Promise.reject(new Error(push.reason));
}
core.info(`Successfully pushed ${imageToPush} to ${registryUrl}.`);
}
async function execute(executable: string, args: string[]): Promise<CommandResult> {