From d54ef8b749f8ca3e2611e806a61bfe6c8a3ff2f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robin=20M=C3=BCller?= Date: Tue, 28 Sep 2021 09:34:32 +0200 Subject: [PATCH] Add output property bootstrap-deploy --- action.yml | 2 ++ index.js | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/action.yml b/action.yml index e21c3fd..42f384e 100644 --- a/action.yml +++ b/action.yml @@ -21,6 +21,8 @@ outputs: description: 'The allowed quota for the storage' deployment-enabled: description: 'Is the deployement enabled for this branch' + bootstrap-deploy: + description: "true if it's the first deployment" runs: using: 'node12' main: 'index.js' diff --git a/index.js b/index.js index 291bff8..302683c 100644 --- a/index.js +++ b/index.js @@ -671,6 +671,8 @@ try { core.setOutput("storage-quota", branch.webSpaceQuota.storageQuota); console.log(`deployment-enabled: true`) core.setOutput("deployment-enabled", true); + console.log(`bootstrap-deploy: ${branch.webSpace.lastDeploymentDate == null}`) + core.setOutput("bootstrap-deploy", branch.webSpace.lastDeploymentDate == null); return; } @@ -710,6 +712,8 @@ try { core.setOutput("storage-quota", branch.webSpaceQuota.storageQuota); console.log(`deployment-enabled: true`) core.setOutput("deployment-enabled", true); + console.log(`bootstrap-deploy: ${branch.webSpace.lastDeploymentDate == null}`) + core.setOutput("bootstrap-deploy", branch.webSpace.lastDeploymentDate == null); }) .catch(err => { core.setFailed(err);