From 6bd4097992f48577ff96f62ccd677f0e30f776d1 Mon Sep 17 00:00:00 2001 From: Colin McDonnell Date: Tue, 27 Jan 2026 19:06:17 +0000 Subject: [PATCH] Test with local action --- check-github-token/action.yml | 7 +++++++ check-github-token/entry.ts | 20 ++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 check-github-token/action.yml create mode 100644 check-github-token/entry.ts diff --git a/check-github-token/action.yml b/check-github-token/action.yml new file mode 100644 index 0000000..23350b5 --- /dev/null +++ b/check-github-token/action.yml @@ -0,0 +1,7 @@ +name: "Check GitHub Token" +description: "Check if GITHUB_TOKEN environment variable exists" +author: "Pullfrog" + +runs: + using: "node24" + main: "entry.ts" diff --git a/check-github-token/entry.ts b/check-github-token/entry.ts new file mode 100644 index 0000000..69f068f --- /dev/null +++ b/check-github-token/entry.ts @@ -0,0 +1,20 @@ +#!/usr/bin/env node + +/** + * simple check that GITHUB_TOKEN env var exists + */ + +import * as core from "@actions/core"; + +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"); + } +} + +await run();