From 6df9f804e9876dd125aa1952774f8d80ac3a82a7 Mon Sep 17 00:00:00 2001 From: rolljee Date: Tue, 10 Dec 2024 22:31:48 +0100 Subject: [PATCH] fix: login should happen at the begining --- index.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/index.js b/index.js index ab3ad046..c623b7d0 100644 --- a/index.js +++ b/index.js @@ -252,6 +252,12 @@ class Action { } async run() { + await this.login(); + + if (this.inputs.login_only) { + return; + } + if (!this.inputs.image) { throw new Error( `You're attempting to deploy but you didn't provide a Docker image name to do so.` @@ -262,11 +268,6 @@ class Action { throw new Error(`Project name required for deployment operations.`); } - await this.login(); - - if (this.inputs.login_only) { - return; - } await this.deploy();