From 410aecc010fc00adb92e5c3a65dc10bb20f79431 Mon Sep 17 00:00:00 2001 From: Colin McDonnell Date: Tue, 27 Jan 2026 19:07:54 +0000 Subject: [PATCH] Test with local action --- check-github-token/entry.ts | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/check-github-token/entry.ts b/check-github-token/entry.ts index 69f068f..a976948 100644 --- a/check-github-token/entry.ts +++ b/check-github-token/entry.ts @@ -4,17 +4,14 @@ * simple check that GITHUB_TOKEN env var exists */ -import * as core from "@actions/core"; +const token = process.env.GITHUB_TOKEN; -async function run(): Promise { - const token = process.env.GITHUB_TOKEN; - - if (token) { - core.info(`GITHUB_TOKEN exists`); - core.info(`token prefix: ${token.substring(0, 10)}...`); - } else { - core.setFailed("GITHUB_TOKEN does not exist"); - } +if (token) { + console.log(`GITHUB_TOKEN exists`); + console.log(`token prefix: ${token.substring(0, 10)}...`); +} else { + console.error("GITHUB_TOKEN does not exist"); + // github actions workflow command to fail the step + console.log("::error::GITHUB_TOKEN does not exist"); + process.exit(1); } - -await run();