feat(tooling): add isLocal to run things conditionally

This commit is contained in:
peaklabs-dev committed 2026-02-13 18:01:44 +01:00
1 parent 108794a756
commit 270680f37f
2 files changed
+4 -3

No files matched your search

+2 -2
View File
@@ -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) # Source branch of a pull_request or pull_request_target event (e.g. feature-branch-1)
# GITHUB_HEAD_REF= # GITHUB_HEAD_REF=
# Always true when GitHub Actions is running the workflow. Use this to differentiate local vs GitHub Actions runs. # Always true when GitHub Actions is running the workflow. This is used to differentiate local vs GitHub Actions runs.
GITHUB_ACTIONS=true GITHUB_ACTIONS=false
# Always true # Always true
CI=true CI=true
+2 -1
View File
@@ -2,9 +2,10 @@ import * as core from "@actions/core";
import { getSettings } from "./settings.ts"; import { getSettings } from "./settings.ts";
import { buildContext } from "./context.ts"; import { buildContext } from "./context.ts";
import { checkExemptions } from "./exemptions.ts"; import { checkExemptions } from "./exemptions.ts";
export async function run(): Promise<void> { export async function run(): Promise<void> {
try { try {
const isLocal = !process.env["GITHUB_ACTIONS"];
const settings = getSettings(); const settings = getSettings();
const context = buildContext(); const context = buildContext();