Skip to content

Commit b5b3e18

Browse files
authored
Fail the action if the function is not ACTIVE when polling completes (#223)
1 parent 72015ae commit b5b3e18

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/main.ts

+10
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,16 @@ async function run(): Promise<void> {
212212
};
213213
})(),
214214
});
215+
216+
if (resp.status !== 'ACTIVE') {
217+
throw new Error(
218+
`Cloud Function deployment finished, but the function not in the ` +
219+
`"ACTIVE" status. The current status is "${resp.status}", which ` +
220+
`could indicate a failed deployment. Check the Cloud Function ` +
221+
`logs for more information.`,
222+
);
223+
}
224+
215225
if (resp.httpsTrigger?.url) {
216226
setOutput('url', resp.httpsTrigger.url);
217227
} else {

0 commit comments

Comments
 (0)