expose GITHUB_REPOSITORY_OWNER. (#378)

This commit is contained in:
Tingluo Huang
2020-03-20 13:02:07 -04:00
committed by GitHub
parent dfaf6e06ee
commit 178a618e01
2 changed files with 15 additions and 0 deletions

View File

@@ -130,6 +130,13 @@ namespace GitHub.Runner.Worker.Container
// Watermark for GitHub Action environment
dockerOptions.Add("-e GITHUB_ACTIONS=true");
// Set CI=true when no one else already set it.
// CI=true is common set in most CI provider in GitHub
if (!container.ContainerEnvironmentVariables.ContainsKey("CI"))
{
dockerOptions.Add("-e CI=true");
}
foreach (var volume in container.MountVolumes)
{
// replace `"` with `\"` and add `"{0}"` to all path.
@@ -189,6 +196,13 @@ namespace GitHub.Runner.Worker.Container
// Watermark for GitHub Action environment
dockerOptions.Add("-e GITHUB_ACTIONS=true");
// Set CI=true when no one else already set it.
// CI=true is common set in most CI provider in GitHub
if (!container.ContainerEnvironmentVariables.ContainsKey("CI"))
{
dockerOptions.Add("-e CI=true");
}
if (!string.IsNullOrEmpty(container.ContainerEntryPoint))
{
dockerOptions.Add($"--entrypoint \"{container.ContainerEntryPoint}\"");

View File

@@ -17,6 +17,7 @@ namespace GitHub.Runner.Worker
"job",
"ref",
"repository",
"repository_owner",
"run_id",
"run_number",
"sha",