mirror of
https://github.com/cloudflare/wrangler-action.git
synced 2024-11-22 18:13:24 +01:00
19 lines
425 B
JavaScript
19 lines
425 B
JavaScript
|
const { execSync } = require("child_process");
|
||
|
|
||
|
function workerHealthCheck() {
|
||
|
const url =
|
||
|
"https://wrangler-action-test.devprod-testing7928.workers.dev/secret-health-check";
|
||
|
|
||
|
const buffer = execSync(`curl ${url}`);
|
||
|
|
||
|
const response = buffer.toString();
|
||
|
|
||
|
response.includes("OK")
|
||
|
? console.log(`Status: Worker is up! Secrets: ${response}`)
|
||
|
: console.log(`Worker is down!`);
|
||
|
|
||
|
return response;
|
||
|
}
|
||
|
|
||
|
workerHealthCheck();
|