mirror of
https://github.com/actions/runner.git
synced 2025-12-11 12:57:05 +00:00
Extend github context with host-workspace (#2517)
* hash files translation works with host context translated * Change file encoding to utf8 for PipelineTemplateConstants.cs * infer the feature flag on hash files based on the existence of the context * encoded utf8 with bom * rename host-workspace to host-work-directory and feature flag the new context var * Added comment to explain ignore host work directory resolution Co-authored-by: fhammerl <fhammerl@github.com> * trigger pipeline * Move to the github host-workspace context instead of the runner host-work-directory * remove unused imports --------- Co-authored-by: fhammerl <fhammerl@github.com>
This commit is contained in:
@@ -175,7 +175,14 @@ namespace GitHub.Runner.Worker
|
||||
context.Debug("Update context data");
|
||||
string _workDirectory = HostContext.GetDirectory(WellKnownDirectory.Work);
|
||||
context.SetRunnerContext("workspace", Path.Combine(_workDirectory, trackingConfig.PipelineDirectory));
|
||||
context.SetGitHubContext("workspace", Path.Combine(_workDirectory, trackingConfig.WorkspaceDirectory));
|
||||
|
||||
var githubWorkspace = Path.Combine(_workDirectory, trackingConfig.WorkspaceDirectory);
|
||||
if (jobContext.Global.Variables.GetBoolean(Constants.Runner.Features.UseContainerPathForTemplate) ?? false)
|
||||
{
|
||||
// This value is used to translate paths from the container path back to the host path.
|
||||
context.SetGitHubContext("host-workspace", githubWorkspace);
|
||||
}
|
||||
context.SetGitHubContext("workspace", githubWorkspace);
|
||||
|
||||
// Temporary hack for GHES alpha
|
||||
var configurationStore = HostContext.GetService<IConfigurationStore>();
|
||||
|
||||
Reference in New Issue
Block a user