wrangler-action/.github/workflows/workerHealthCheck.cjs
Jacob M-G Evans edb2a58814
feat: rewrite Wrangler Action in TypeScript
* Removes dependencies such as Docker, decreasing spin-up time
* Adds community-requested features, including bulk secrets API utilization from Wrangler
* Fixes CI/CD
* Adds testing
* Improves command implementation
* Begins using Node for the Action engine/runner
* Openly discusses all changes with the community
  GitHub Discussions opened and Issues monitored

BREAKING CHANGES:
* Docker is no longer a dependency
* Wrangler v1 is no longer supported

Additional related Internal tickets:
Major Version Default: https://jira.cfdata.org/browse/DEVX-632
Rewrite Project: DEVX-804,802,800,632
2023-08-07 13:05:09 -05:00

18 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();