From ca587d4b9e2cb8a880f453d38631abf3ed6b4fff Mon Sep 17 00:00:00 2001 From: Stephen Hand Date: Mon, 18 Dec 2023 10:54:11 +0000 Subject: [PATCH 1/2] Change healthcheck.ts custom action code to js --- .github/actions/main-action/{healthcheck.ts => healthcheck.js} | 0 .github/actions/main-action/package.json | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename .github/actions/main-action/{healthcheck.ts => healthcheck.js} (100%) diff --git a/.github/actions/main-action/healthcheck.ts b/.github/actions/main-action/healthcheck.js similarity index 100% rename from .github/actions/main-action/healthcheck.ts rename to .github/actions/main-action/healthcheck.js diff --git a/.github/actions/main-action/package.json b/.github/actions/main-action/package.json index f818a8d6..c61f9002 100644 --- a/.github/actions/main-action/package.json +++ b/.github/actions/main-action/package.json @@ -5,7 +5,7 @@ "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", - "healthcheck": "npm install && npx ts-node --esm ./healthcheck.ts" + "healthcheck": "npm install && node healthcheck.js" }, "author": "", "license": "AGPL", From e28866e0da1292d26e41468444f957f47390916e Mon Sep 17 00:00:00 2001 From: Stephen Hand Date: Mon, 18 Dec 2023 11:01:27 +0000 Subject: [PATCH 2/2] Change healthcheck esm imports to requires --- .github/actions/main-action/healthcheck.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/main-action/healthcheck.js b/.github/actions/main-action/healthcheck.js index feaa52dc..cb086938 100644 --- a/.github/actions/main-action/healthcheck.js +++ b/.github/actions/main-action/healthcheck.js @@ -21,9 +21,9 @@ * For details see https://docs.github.com/en/actions/creating-actions/creating-a-javascript-action#commit-tag-and-push-your-action-to-github */ -import { setOutput, setFailed } from '@actions/core'; -import fetch from 'node-fetch'; -import Twilio from 'twilio'; +const { setOutput, setFailed } = require('@actions/core'); +const fetch = require('node-fetch'); +const Twilio = require('twilio'); async function healthCheck () { // `who-to-greet` input defined in action metadata file