From 270680f37ff7556f8d8267d3dd675b239820367b Mon Sep 17 00:00:00 2001 From: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com> Date: Fri, 13 Feb 2026 17:18:28 +0100 Subject: [PATCH] feat(tooling): add isLocal to run things conditionally --- .env.example | 4 ++-- src/main.ts | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.env.example b/.env.example index 2c57b9e..c4bd1f6 100644 --- a/.env.example +++ b/.env.example @@ -39,8 +39,8 @@ GITHUB_STEP_SUMMARY=tests/summary.html # Source branch of a pull_request or pull_request_target event (e.g. feature-branch-1) # GITHUB_HEAD_REF= -# Always true when GitHub Actions is running the workflow. Use this to differentiate local vs GitHub Actions runs. -GITHUB_ACTIONS=true +# Always true when GitHub Actions is running the workflow. This is used to differentiate local vs GitHub Actions runs. +GITHUB_ACTIONS=false # Always true CI=true diff --git a/src/main.ts b/src/main.ts index aa7f249..2d9cef0 100644 --- a/src/main.ts +++ b/src/main.ts @@ -2,9 +2,10 @@ import * as core from "@actions/core"; import { getSettings } from "./settings.ts"; import { buildContext } from "./context.ts"; import { checkExemptions } from "./exemptions.ts"; - export async function run(): Promise { try { + const isLocal = !process.env["GITHUB_ACTIONS"]; + const settings = getSettings(); const context = buildContext();