mirror of
https://github.com/actions/runner.git
synced 2025-12-11 21:06:55 +00:00
Compare commits
1 Commits
hross-sln-
...
v2.277.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a0fa09ddcc |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -23,3 +23,6 @@ TestResults
|
|||||||
TestLogs
|
TestLogs
|
||||||
.DS_Store
|
.DS_Store
|
||||||
**/*.DotSettings.user
|
**/*.DotSettings.user
|
||||||
|
|
||||||
|
#generated
|
||||||
|
src/Runner.Sdk/BuildConstants.cs
|
||||||
|
|||||||
@@ -1,11 +1,16 @@
|
|||||||
## Features
|
## Features
|
||||||
|
- Verify the Runner Hash during auto-upgrade before installing the new runner version (#967)
|
||||||
|
- Support download of runners from authenticated endpoints (#920)
|
||||||
|
- Enabled tty output in Docker Actions (#916)
|
||||||
|
- Added '--check' command to verify runner connectivity (#949)
|
||||||
|
|
||||||
## Bugs
|
## Bugs
|
||||||
- Fixed an issue where docker containers failed to initialize (#977)
|
- Fix usage of /dev/null and ping in run.sh (#968)
|
||||||
|
|
||||||
## Misc
|
## Misc
|
||||||
|
- Updated the copy for various runner messages (#972)
|
||||||
|
- Added the runner's OS to telemetry (#939)
|
||||||
|
- Various other telemetry improvements (#935)
|
||||||
|
|
||||||
## Windows x64
|
## Windows x64
|
||||||
We recommend configuring the runner in a root folder of the Windows drive (e.g. "C:\actions-runner"). This will help avoid issues related to service identity folder permissions and long file path restrictions on Windows.
|
We recommend configuring the runner in a root folder of the Windows drive (e.g. "C:\actions-runner"). This will help avoid issues related to service identity folder permissions and long file path restrictions on Windows.
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
<Update to ./src/runnerversion when creating release>
|
2.277.0
|
||||||
|
|||||||
@@ -84,7 +84,6 @@ namespace GitHub.Runner.Common
|
|||||||
this.SecretMasker.AddValueEncoder(ValueEncoders.Base64StringEscape);
|
this.SecretMasker.AddValueEncoder(ValueEncoders.Base64StringEscape);
|
||||||
this.SecretMasker.AddValueEncoder(ValueEncoders.Base64StringEscapeShift1);
|
this.SecretMasker.AddValueEncoder(ValueEncoders.Base64StringEscapeShift1);
|
||||||
this.SecretMasker.AddValueEncoder(ValueEncoders.Base64StringEscapeShift2);
|
this.SecretMasker.AddValueEncoder(ValueEncoders.Base64StringEscapeShift2);
|
||||||
this.SecretMasker.AddValueEncoder(ValueEncoders.CommandLineArgumentEscape);
|
|
||||||
this.SecretMasker.AddValueEncoder(ValueEncoders.ExpressionStringEscape);
|
this.SecretMasker.AddValueEncoder(ValueEncoders.ExpressionStringEscape);
|
||||||
this.SecretMasker.AddValueEncoder(ValueEncoders.JsonStringEscape);
|
this.SecretMasker.AddValueEncoder(ValueEncoders.JsonStringEscape);
|
||||||
this.SecretMasker.AddValueEncoder(ValueEncoders.UriDataEscape);
|
this.SecretMasker.AddValueEncoder(ValueEncoders.UriDataEscape);
|
||||||
|
|||||||
@@ -225,7 +225,7 @@ namespace GitHub.Runner.Listener
|
|||||||
using (FileStream fs = new FileStream(archiveFile, FileMode.Create, FileAccess.Write, FileShare.None, bufferSize: 4096, useAsync: true))
|
using (FileStream fs = new FileStream(archiveFile, FileMode.Create, FileAccess.Write, FileShare.None, bufferSize: 4096, useAsync: true))
|
||||||
using (Stream result = await httpClient.GetStreamAsync(_targetPackage.DownloadUrl))
|
using (Stream result = await httpClient.GetStreamAsync(_targetPackage.DownloadUrl))
|
||||||
{
|
{
|
||||||
//81920 is the default used by System.IO.Stream.CopyTo and is under the large object heap threshold (85k).
|
//81920 is the default used by System.IO.Stream.CopyTo and is under the large object heap threshold (85k).
|
||||||
await result.CopyToAsync(fs, 81920, downloadCts.Token);
|
await result.CopyToAsync(fs, 81920, downloadCts.Token);
|
||||||
await fs.FlushAsync(downloadCts.Token);
|
await fs.FlushAsync(downloadCts.Token);
|
||||||
}
|
}
|
||||||
@@ -357,13 +357,8 @@ namespace GitHub.Runner.Listener
|
|||||||
Trace.Info($"Copy any remaining .sh/.cmd files into runner root.");
|
Trace.Info($"Copy any remaining .sh/.cmd files into runner root.");
|
||||||
foreach (FileInfo file in new DirectoryInfo(latestRunnerDirectory).GetFiles() ?? new FileInfo[0])
|
foreach (FileInfo file in new DirectoryInfo(latestRunnerDirectory).GetFiles() ?? new FileInfo[0])
|
||||||
{
|
{
|
||||||
string destination = Path.Combine(HostContext.GetDirectory(WellKnownDirectory.Root), file.Name);
|
// Copy and replace the file.
|
||||||
|
file.CopyTo(Path.Combine(HostContext.GetDirectory(WellKnownDirectory.Root), file.Name), true);
|
||||||
// Removing the file instead of just trying to overwrite it works around permissions issues on linux.
|
|
||||||
// https://github.com/actions/runner/issues/981
|
|
||||||
Trace.Info($"Copy {file.FullName} to {destination}");
|
|
||||||
IOUtil.DeleteFile(destination);
|
|
||||||
file.CopyTo(destination, true);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@@ -197,7 +197,8 @@ namespace GitHub.Runner.Worker.Container
|
|||||||
|
|
||||||
dockerOptions.Add($"--workdir {container.ContainerWorkDirectory}");
|
dockerOptions.Add($"--workdir {container.ContainerWorkDirectory}");
|
||||||
dockerOptions.Add($"--rm");
|
dockerOptions.Add($"--rm");
|
||||||
|
dockerOptions.Add($"-t");
|
||||||
|
|
||||||
foreach (var env in container.ContainerEnvironmentVariables)
|
foreach (var env in container.ContainerEnvironmentVariables)
|
||||||
{
|
{
|
||||||
// e.g. -e MY_SECRET maps the value into the exec'ed process without exposing
|
// e.g. -e MY_SECRET maps the value into the exec'ed process without exposing
|
||||||
|
|||||||
@@ -198,7 +198,8 @@ namespace GitHub.Runner.Worker
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
UpdateRegistryAuthForGitHubToken(executionContext, container);
|
// TODO: Add at a later date. This currently no local package registry to test with
|
||||||
|
// UpdateRegistryAuthForGitHubToken(executionContext, container);
|
||||||
|
|
||||||
// Before pulling, generate client authentication if required
|
// Before pulling, generate client authentication if required
|
||||||
var configLocation = await ContainerRegistryLogin(executionContext, container);
|
var configLocation = await ContainerRegistryLogin(executionContext, container);
|
||||||
@@ -493,14 +494,31 @@ namespace GitHub.Runner.Worker
|
|||||||
|
|
||||||
private void UpdateRegistryAuthForGitHubToken(IExecutionContext executionContext, ContainerInfo container)
|
private void UpdateRegistryAuthForGitHubToken(IExecutionContext executionContext, ContainerInfo container)
|
||||||
{
|
{
|
||||||
var registryIsTokenCompatible = container.RegistryServer.Equals("ghcr.io", StringComparison.OrdinalIgnoreCase) || container.RegistryServer.Equals("containers.pkg.github.com", StringComparison.OrdinalIgnoreCase);
|
var registryIsTokenCompatible = container.RegistryServer.Equals("docker.pkg.github.com", StringComparison.OrdinalIgnoreCase);
|
||||||
if (!registryIsTokenCompatible)
|
if (!registryIsTokenCompatible)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var registryMatchesWorkflow = false;
|
||||||
|
|
||||||
|
// REGISTRY/OWNER/REPO/IMAGE[:TAG]
|
||||||
|
var imageParts = container.ContainerImage.Split('/');
|
||||||
|
if (imageParts.Length != 4)
|
||||||
|
{
|
||||||
|
executionContext.Warning($"Could not identify owner and repo for container image {container.ContainerImage}. Skipping automatic token auth");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var owner = imageParts[1];
|
||||||
|
var repo = imageParts[2];
|
||||||
|
var nwo = $"{owner}/{repo}";
|
||||||
|
if (nwo.Equals(executionContext.GetGitHubContext("repository"), StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
registryMatchesWorkflow = true;
|
||||||
|
}
|
||||||
|
|
||||||
var registryCredentialsNotSupplied = string.IsNullOrEmpty(container.RegistryAuthUsername) && string.IsNullOrEmpty(container.RegistryAuthPassword);
|
var registryCredentialsNotSupplied = string.IsNullOrEmpty(container.RegistryAuthUsername) && string.IsNullOrEmpty(container.RegistryAuthPassword);
|
||||||
if (registryCredentialsNotSupplied)
|
if (registryCredentialsNotSupplied && registryMatchesWorkflow)
|
||||||
{
|
{
|
||||||
container.RegistryAuthUsername = executionContext.GetGitHubContext("actor");
|
container.RegistryAuthUsername = executionContext.GetGitHubContext("actor");
|
||||||
container.RegistryAuthPassword = executionContext.GetGitHubContext("token");
|
container.RegistryAuthPassword = executionContext.GetGitHubContext("token");
|
||||||
|
|||||||
@@ -182,7 +182,7 @@ namespace GitHub.Runner.Worker.Handlers
|
|||||||
dockerCommandArgs.Add($"exec");
|
dockerCommandArgs.Add($"exec");
|
||||||
|
|
||||||
// [OPTIONS]
|
// [OPTIONS]
|
||||||
dockerCommandArgs.Add($"-i");
|
dockerCommandArgs.Add($"-it");
|
||||||
dockerCommandArgs.Add($"--workdir {workingDirectory}");
|
dockerCommandArgs.Add($"--workdir {workingDirectory}");
|
||||||
foreach (var env in environment)
|
foreach (var env in environment)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -37,12 +37,6 @@ namespace GitHub.DistributedTask.Logging
|
|||||||
return Base64StringEscapeShift(value, 2);
|
return Base64StringEscapeShift(value, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Used when we pass environment variables to docker to escape " with \"
|
|
||||||
public static String CommandLineArgumentEscape(String value)
|
|
||||||
{
|
|
||||||
return value.Replace("\"", "\\\"");
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String ExpressionStringEscape(String value)
|
public static String ExpressionStringEscape(String value)
|
||||||
{
|
{
|
||||||
return Expressions2.Sdk.ExpressionUtility.StringEscape(value);
|
return Expressions2.Sdk.ExpressionUtility.StringEscape(value);
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
2.277.1
|
2.277.0
|
||||||
|
|||||||
Reference in New Issue
Block a user