expose github.actor_id, github.workflow_ref & github.workflow_sha as environment variable (#2249)

* expose workflow refs/sha  as environment variables

* fixes environment variable ordering

* job_workflow_ref/sha aren't available in gh ctx
This commit is contained in:
Amit Rathi
2022-11-17 21:41:52 +05:30
committed by GitHub
parent dda53af485
commit 98c857b927

View File

@@ -13,6 +13,7 @@ namespace GitHub.Runner.Worker
"action_repository", "action_repository",
"action", "action",
"actor", "actor",
"actor_id",
"api_url", "api_url",
"base_ref", "base_ref",
"env", "env",
@@ -27,8 +28,10 @@ namespace GitHub.Runner.Worker
"ref_protected", "ref_protected",
"ref_type", "ref_type",
"ref", "ref",
"repository_owner",
"repository", "repository",
"repository_id",
"repository_owner",
"repository_owner_id",
"retention_days", "retention_days",
"run_attempt", "run_attempt",
"run_id", "run_id",
@@ -39,7 +42,9 @@ namespace GitHub.Runner.Worker
"step_summary", "step_summary",
"triggering_actor", "triggering_actor",
"workflow", "workflow",
"workspace", "workflow_ref",
"workflow_sha",
"workspace"
}; };
public IEnumerable<KeyValuePair<string, string>> GetRuntimeEnvironmentVariables() public IEnumerable<KeyValuePair<string, string>> GetRuntimeEnvironmentVariables()