From 356bfdb8d9ba8ae3b8cd3a540072fcda15a4f724 Mon Sep 17 00:00:00 2001 From: snehapar9 Date: Sat, 30 Sep 2023 02:33:48 -0700 Subject: [PATCH] Fix docker push command --- dist/index.js | 2 +- src/ContainerRegistryHelper.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index 630e470d..3147ddae 100644 --- a/dist/index.js +++ b/dist/index.js @@ -5412,7 +5412,7 @@ var ContainerRegistryHelper = /** @class */ (function () { return [4 /*yield*/, toolHelper.which("docker", true)]; case 2: dockerTool = _a.sent(); - return [4 /*yield*/, util.executeAndThrowIfError(dockerTool + " tag " + imageToPush + " " + imageToPush)]; + return [4 /*yield*/, util.executeAndThrowIfError(dockerTool + " push " + imageToPush)]; case 3: _a.sent(); return [3 /*break*/, 5]; diff --git a/src/ContainerRegistryHelper.ts b/src/ContainerRegistryHelper.ts index 2a09fe84..b7fe6b4e 100644 --- a/src/ContainerRegistryHelper.ts +++ b/src/ContainerRegistryHelper.ts @@ -47,7 +47,7 @@ export class ContainerRegistryHelper { toolHelper.writeDebug(`Attempting to push image "${imageToPush}" to ACR`); try { let dockerTool: string = await toolHelper.which("docker", true); - await util.executeAndThrowIfError(`${dockerTool} tag ${imageToPush} ${imageToPush}`); + await util.executeAndThrowIfError(`${dockerTool} push ${imageToPush}`); } catch (err) { toolHelper.writeError(`Failed to push image "${imageToPush}" to ACR. Error: ${err.message}`); throw err;