mirror of
https://github.com/actions/runner.git
synced 2025-12-12 05:37:01 +00:00
expose GITHUB_REPOSITORY_OWNER. (#378)
This commit is contained in:
@@ -130,6 +130,13 @@ namespace GitHub.Runner.Worker.Container
|
|||||||
// Watermark for GitHub Action environment
|
// Watermark for GitHub Action environment
|
||||||
dockerOptions.Add("-e GITHUB_ACTIONS=true");
|
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)
|
foreach (var volume in container.MountVolumes)
|
||||||
{
|
{
|
||||||
// replace `"` with `\"` and add `"{0}"` to all path.
|
// replace `"` with `\"` and add `"{0}"` to all path.
|
||||||
@@ -189,6 +196,13 @@ namespace GitHub.Runner.Worker.Container
|
|||||||
// Watermark for GitHub Action environment
|
// Watermark for GitHub Action environment
|
||||||
dockerOptions.Add("-e GITHUB_ACTIONS=true");
|
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))
|
if (!string.IsNullOrEmpty(container.ContainerEntryPoint))
|
||||||
{
|
{
|
||||||
dockerOptions.Add($"--entrypoint \"{container.ContainerEntryPoint}\"");
|
dockerOptions.Add($"--entrypoint \"{container.ContainerEntryPoint}\"");
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ namespace GitHub.Runner.Worker
|
|||||||
"job",
|
"job",
|
||||||
"ref",
|
"ref",
|
||||||
"repository",
|
"repository",
|
||||||
|
"repository_owner",
|
||||||
"run_id",
|
"run_id",
|
||||||
"run_number",
|
"run_number",
|
||||||
"sha",
|
"sha",
|
||||||
|
|||||||
Reference in New Issue
Block a user