Add missing runner context properties (environment, debug, workspace) (#241)
Fixes #78, #121 Adds three missing properties to the runner context: - runner.environment: The runner environment (github-hosted or self-hosted) - runner.debug: Set to '1' when step debug logging is enabled via ACTIONS_STEP_DEBUG - runner.workspace: The runner-specific working directory path for the job These are documented official properties that were causing false 'Context access might be invalid' warnings.
This commit is contained in:
@@ -83,11 +83,14 @@ function getDefaultContext(name: string, workflowContext: WorkflowContext, mode:
|
||||
|
||||
case "runner":
|
||||
return objectToDictionary({
|
||||
os: "Linux",
|
||||
arch: "X64",
|
||||
debug: "1",
|
||||
environment: "github-hosted",
|
||||
name: "GitHub Actions 2",
|
||||
os: "Linux",
|
||||
temp: "/home/runner/work/_temp",
|
||||
tool_cache: "/opt/hostedtoolcache",
|
||||
temp: "/home/runner/work/_temp"
|
||||
workspace: "/home/runner/work/repo"
|
||||
});
|
||||
|
||||
case "secrets":
|
||||
|
||||
Reference in New Issue
Block a user