Skip to content

Commit 5c3274c

Browse files
chore(release): 1.2.0 [skip ci]
# [1.2.0](v1.1.0...v1.2.0) (2023-02-12) ### Bug Fixes * **actions:** fail this action on some status messages ([74f150f](74f150f)) ### Features * **deps:** bump @semantic-release/changelog from 6.0.1 to 6.0.2 ([73639e5](73639e5)) * **deps:** bump @vercel/ncc from 0.34.0 to 0.36.0 ([8ebe878](8ebe878)) * **deps:** bump @vercel/ncc from 0.36.0 to 0.36.1 ([fe6cd9c](fe6cd9c))
1 parent 74f150f commit 5c3274c

File tree

3 files changed

+28
-24
lines changed

3 files changed

+28
-24
lines changed

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# [1.2.0](https://github.com/sws2apps/render-deployment/compare/v1.1.0...v1.2.0) (2023-02-12)
2+
3+
4+
### Bug Fixes
5+
6+
* **actions:** fail this action on some status messages ([74f150f](https://github.com/sws2apps/render-deployment/commit/74f150f45f501e56136696a08bedb913b957ae00))
7+
8+
9+
### Features
10+
11+
* **deps:** bump @semantic-release/changelog from 6.0.1 to 6.0.2 ([73639e5](https://github.com/sws2apps/render-deployment/commit/73639e5147f570e0959508032494d8daee876862))
12+
* **deps:** bump @vercel/ncc from 0.34.0 to 0.36.0 ([8ebe878](https://github.com/sws2apps/render-deployment/commit/8ebe878aead307b48b389153bf92766f0e73c026))
13+
* **deps:** bump @vercel/ncc from 0.36.0 to 0.36.1 ([fe6cd9c](https://github.com/sws2apps/render-deployment/commit/fe6cd9cf21851430d4e2326a6ab5fc21083d4eb9))
14+
115
# [1.1.0](https://github.com/sws2apps/render-deployment/compare/v1.0.0...v1.1.0) (2022-11-11)
216

317

dist/index.js

Lines changed: 13 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7952,7 +7952,7 @@ function dataUriToBuffer(uri) {
79527952
if (meta[i] === 'base64') {
79537953
base64 = true;
79547954
}
7955-
else {
7955+
else if (meta[i]) {
79567956
typeFull += `;${meta[i]}`;
79577957
if (meta[i].indexOf('charset=') === 0) {
79587958
charset = meta[i].substring(8);
@@ -10086,7 +10086,7 @@ const run = async () => {
1008610086
return;
1008710087
}
1008810088

10089-
const multipleInput = core.getInput('multiple') || process.env.multiple;
10089+
const multipleInput = core.getInput('multipleDeployment') || process.env.multipleDeployment;
1009010090
const multiple = multipleInput === 'true' ? true : false;
1009110091

1009210092
try {
@@ -10101,36 +10101,24 @@ const run = async () => {
1010110101
};
1010210102

1010310103
// check if there is a deployment in progress
10104-
res = await fetch(
10105-
`https://api.render.com/v1/services/${serviceId}/deploys?limit=20`,
10106-
{ method: 'GET', ...options }
10107-
);
10104+
res = await fetch(`https://api.render.com/v1/services/${serviceId}/deploys?limit=20`, { method: 'GET', ...options });
1010810105
data = await res.json();
1010910106

1011010107
if (res.status !== 200) {
1011110108
core.setFailed(`This operation did not succeed. Reason: ${data.message}`);
1011210109
return;
1011310110
}
1011410111

10115-
const hasInProgressBuild = data.find(
10116-
(instance) => instance.deploy.status === 'build_in_progress'
10117-
)
10118-
? true
10119-
: false;
10120-
10112+
const hasInProgressBuild = data.find((instance) => instance.deploy.status === 'build_in_progress') ? true : false;
10113+
1012110114
// check if multiple is set to false if there is active build
1012210115
if (!multiple && hasInProgressBuild) {
10123-
core.setFailed(
10124-
'Your Render Service has an active build in progress. Wait for that to complete before deploying again'
10125-
);
10116+
core.setFailed('Your Render Service has an active build in progress. Wait for that to complete before deploying again');
1012610117
return;
1012710118
}
1012810119

1012910120
// triggering deployment
10130-
res = await fetch(
10131-
`https://api.render.com/v1/services/${serviceId}/deploys`,
10132-
{ method: 'POST', ...options }
10133-
);
10121+
res = await fetch(`https://api.render.com/v1/services/${serviceId}/deploys`, { method: 'POST', ...options });
1013410122
data = await res.json();
1013510123

1013610124
if (res.status !== 201) {
@@ -10147,17 +10135,19 @@ const run = async () => {
1014710135
core.info('Starting deployment in Render ...');
1014810136

1014910137
while (!isCompleted && !hasError) {
10150-
res = await fetch(
10151-
`https://api.render.com/v1/services/${serviceId}/deploys/${deployId}`,
10152-
{ method: 'GET', ...options }
10153-
);
10138+
res = await fetch(`https://api.render.com/v1/services/${serviceId}/deploys/${deployId}`, { method: 'GET', ...options });
1015410139
data = await res.json();
1015510140

1015610141
if (res.status !== 200) {
1015710142
core.error(`An error occured. Reason: ${data.message}`);
1015810143
hasError = true;
1015910144
}
1016010145

10146+
if (data.status === 'update_failed' || data.status === 'build_failed' || data.status === 'canceled') {
10147+
core.error(`Something went wrong. Login to Render Dashboard to learn more about the issue.`);
10148+
hasError = true;
10149+
}
10150+
1016110151
if (data.status === 'live') {
1016210152
isCompleted = true;
1016310153
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "render-deployment",
33
"description": "A GitHub Action to trigger deployment in Render.",
4-
"version": "1.1.0",
4+
"version": "1.2.0",
55
"private": true,
66
"type": "module",
77
"homepage": "https://github.com/sws2apps/render-deployment#readme",

0 commit comments

Comments
 (0)