Skip to content

Commit

Permalink
Retry retrieving the project info for the production branch as well i…
Browse files Browse the repository at this point in the history
…f the quota was not present
  • Loading branch information
coder-hugo committed Jun 28, 2021
1 parent ac5eaa1 commit 4d15254
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,16 @@ try {
const project = res.data;
if (project.productionBranch.name === branchName) {
const branch = project.productionBranch;

if (branch.webSpaceQuota === null || branch.webSpaceQuota === undefined) {
if (counter === 0) {
core.setFailed('The IONOS.space project is not yet setup properly');
} else {
retry(function () { retrieveProjectInfo(counter - 1)}, counter);
}
return;
}

console.log(`site-url: https://${project.domain}`)
core.setOutput("site-url", `https://${project.domain}`);
console.log(`remote-host: ${branch.webSpace.sshHost}`)
Expand Down

0 comments on commit 4d15254

Please sign in to comment.