From fb498e7161e2b2320666190effb2ad66fc80c6d0 Mon Sep 17 00:00:00 2001 From: shmuel-blitz <129649279+shmuel-blitz@users.noreply.github.com> Date: Thu, 11 May 2023 09:48:58 +0300 Subject: [PATCH 1/2] added ENV VAR to control the github actions behavior --- beanstalk-deploy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beanstalk-deploy.js b/beanstalk-deploy.js index 8521ab8..1afb9fc 100755 --- a/beanstalk-deploy.js +++ b/beanstalk-deploy.js @@ -258,7 +258,7 @@ function main() { waitForRecoverySeconds = 30, waitUntilDeploymentIsFinished = true; //Whether or not to wait for the deployment to complete... - if (IS_GITHUB_ACTION) { //Running in GitHub Actions + if (IS_GITHUB_ACTION && !process.env.BEANSTALK_DEPLOY_USE_CLI) { //Running in GitHub Actions application = strip(process.env.INPUT_APPLICATION_NAME); environmentName = strip(process.env.INPUT_ENVIRONMENT_NAME); versionLabel = strip(process.env.INPUT_VERSION_LABEL); From 435b85a455899bfffc4c09bde2637fe24c202fed Mon Sep 17 00:00:00 2001 From: shmuel-blitz <129649279+shmuel-blitz@users.noreply.github.com> Date: Thu, 11 May 2023 09:50:42 +0300 Subject: [PATCH 2/2] cleanUP --- beanstalk-deploy.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/beanstalk-deploy.js b/beanstalk-deploy.js index 1afb9fc..e08bcd6 100755 --- a/beanstalk-deploy.js +++ b/beanstalk-deploy.js @@ -5,6 +5,7 @@ const awsApiRequest = require('./aws-api-request'); const fs = require('fs'); const IS_GITHUB_ACTION = !!process.env.GITHUB_ACTIONS; +const USE_CLI = !!process.env.BEANSTALK_DEPLOY_USE_CLI; if (IS_GITHUB_ACTION) { console.error = msg => console.log(`::error::${msg}`); @@ -258,7 +259,7 @@ function main() { waitForRecoverySeconds = 30, waitUntilDeploymentIsFinished = true; //Whether or not to wait for the deployment to complete... - if (IS_GITHUB_ACTION && !process.env.BEANSTALK_DEPLOY_USE_CLI) { //Running in GitHub Actions + if (IS_GITHUB_ACTION && !USE_CLI) { //Running in GitHub Actions application = strip(process.env.INPUT_APPLICATION_NAME); environmentName = strip(process.env.INPUT_ENVIRONMENT_NAME); versionLabel = strip(process.env.INPUT_VERSION_LABEL);