mirror of
https://github.com/peakoss/anti-slop
synced 2026-12-01 13:39:13 +08:00
feat(tooling): add isLocal to run things conditionally
This commit is contained in:
2 files changed
+4
-3
No files matched your search
+2
-2
@@ -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
|
||||
|
||||
+2
-1
@@ -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<void> {
|
||||
try {
|
||||
const isLocal = !process.env["GITHUB_ACTIONS"];
|
||||
|
||||
const settings = getSettings();
|
||||
|
||||
const context = buildContext();
|
||||
|
||||
Reference in new issue
Block a user