mirror of
https://github.com/actions/runner.git
synced 2025-12-11 21:06:55 +00:00
Compare commits
6 Commits
testingScr
...
v2.272.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ae543d5975 | ||
|
|
38f816c2ae | ||
|
|
bc1fe2cfe0 | ||
|
|
89a13db2c3 | ||
|
|
d59092d973 | ||
|
|
855b90c3d4 |
1
.github/workflows/release.yml
vendored
1
.github/workflows/release.yml
vendored
@@ -1,6 +1,7 @@
|
|||||||
name: Runner CD
|
name: Runner CD
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
paths:
|
paths:
|
||||||
- releaseVersion
|
- releaseVersion
|
||||||
|
|||||||
@@ -1,18 +1,15 @@
|
|||||||
## Features
|
## Features
|
||||||
- Resolve action download info from server (#508, #515, #550)
|
- Composite Actions Support for Multiple Run Steps (#549, #557, #564, #568, #569, #578, #591, #599, #605, #609, #610, #615, #624)
|
||||||
- Print runner and machine name to log. (#539)
|
- Prepare to switch GITHUB_ACTION to use ContextName instead of refname (#593)
|
||||||
|
- Fold logs for intermediate docker commands (#608)
|
||||||
|
- Add ability to register a runner to the non-default self-hosted runner group (#613)
|
||||||
|
|
||||||
## Bugs
|
## Bugs
|
||||||
- Reduce input validation warnings (#506)
|
- Double quotes around variable so CD works if path contains spaces (#602)
|
||||||
- Fix null ref exception in SecretMasker caused by `hashfiles` timeout. (#516)
|
- Bump lodash in /src/Misc/expressionFunc/hashFiles (#603)
|
||||||
- Add libicu66 to `./installDependencies.sh` for Ubuntu 20.04 (#535)
|
- Fix poor performance of process spawned from svc daemon (#614)
|
||||||
- Fix DataContract with Token service (#532)
|
|
||||||
- Skip search $PATH on command with fully qualified path (#526)
|
|
||||||
- Restore SELinux context on service file when SELinux is enabled (#525)
|
|
||||||
## Misc
|
## Misc
|
||||||
- Remove SPS/Token migration code. Remove GHES url manipulate code. (#513)
|
- Move shared ExecutionContext properties under .Global (#594)
|
||||||
- Add sub-step for developer flow for clarity (#523)
|
|
||||||
- Update Links and Language to Git + VSCode (#522)
|
|
||||||
- Update runner configuration exception message (#540)
|
|
||||||
|
|
||||||
## 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.272.0
|
||||||
|
|||||||
@@ -23,5 +23,7 @@
|
|||||||
<key>ACTIONS_RUNNER_SVC</key>
|
<key>ACTIONS_RUNNER_SVC</key>
|
||||||
<string>1</string>
|
<string>1</string>
|
||||||
</dict>
|
</dict>
|
||||||
|
<key>ProcessType</key>
|
||||||
|
<string>Interactive</string>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|||||||
@@ -395,7 +395,7 @@ namespace GitHub.Runner.Worker
|
|||||||
Trace.Info($"Action cleanup plugin: {plugin.PluginTypeName}.");
|
Trace.Info($"Action cleanup plugin: {plugin.PluginTypeName}.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (definition.Data.Execution.ExecutionType == ActionExecutionType.Composite && !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("TESTING_COMPOSITE_ACTIONS_ALPHA")))
|
else if (definition.Data.Execution.ExecutionType == ActionExecutionType.Composite)
|
||||||
{
|
{
|
||||||
var compositeAction = definition.Data.Execution as CompositeActionExecutionData;
|
var compositeAction = definition.Data.Execution as CompositeActionExecutionData;
|
||||||
Trace.Info($"Load {compositeAction.Steps?.Count ?? 0} action steps.");
|
Trace.Info($"Load {compositeAction.Steps?.Count ?? 0} action steps.");
|
||||||
@@ -1048,7 +1048,7 @@ namespace GitHub.Runner.Worker
|
|||||||
Trace.Info($"Action plugin: {(actionDefinitionData.Execution as PluginActionExecutionData).Plugin}, no more preparation.");
|
Trace.Info($"Action plugin: {(actionDefinitionData.Execution as PluginActionExecutionData).Plugin}, no more preparation.");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
else if (actionDefinitionData.Execution.ExecutionType == ActionExecutionType.Composite && !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("TESTING_COMPOSITE_ACTIONS_ALPHA")))
|
else if (actionDefinitionData.Execution.ExecutionType == ActionExecutionType.Composite)
|
||||||
{
|
{
|
||||||
Trace.Info($"Action composite: {(actionDefinitionData.Execution as CompositeActionExecutionData).Steps}, no more preparation.");
|
Trace.Info($"Action composite: {(actionDefinitionData.Execution as CompositeActionExecutionData).Steps}, no more preparation.");
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@@ -105,13 +105,8 @@ namespace GitHub.Runner.Worker
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case "outputs":
|
case "outputs":
|
||||||
if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("TESTING_COMPOSITE_ACTIONS_ALPHA")))
|
|
||||||
{
|
|
||||||
actionOutputs = actionPair.Value.AssertMapping("outputs");
|
actionOutputs = actionPair.Value.AssertMapping("outputs");
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
Trace.Info($"Ignore action property outputs. Outputs for a whole action is not supported yet.");
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "description":
|
case "description":
|
||||||
actionDefinition.Description = actionPair.Value.AssertString("description").Value;
|
actionDefinition.Description = actionPair.Value.AssertString("description").Value;
|
||||||
@@ -423,14 +418,10 @@ namespace GitHub.Runner.Worker
|
|||||||
preIfToken = run.Value.AssertString("pre-if");
|
preIfToken = run.Value.AssertString("pre-if");
|
||||||
break;
|
break;
|
||||||
case "steps":
|
case "steps":
|
||||||
if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("TESTING_COMPOSITE_ACTIONS_ALPHA")))
|
|
||||||
{
|
|
||||||
var stepsToken = run.Value.AssertSequence("steps");
|
var stepsToken = run.Value.AssertSequence("steps");
|
||||||
steps = PipelineTemplateConverter.ConvertToSteps(templateContext, stepsToken);
|
steps = PipelineTemplateConverter.ConvertToSteps(templateContext, stepsToken);
|
||||||
templateContext.Errors.Check();
|
templateContext.Errors.Check();
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
throw new Exception("You aren't supposed to be using Composite Actions yet!");
|
|
||||||
default:
|
default:
|
||||||
Trace.Info($"Ignore run property {runsKey}.");
|
Trace.Info($"Ignore run property {runsKey}.");
|
||||||
break;
|
break;
|
||||||
@@ -478,7 +469,7 @@ namespace GitHub.Runner.Worker
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (string.Equals(usingToken.Value, "composite", StringComparison.OrdinalIgnoreCase) && !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("TESTING_COMPOSITE_ACTIONS_ALPHA")))
|
else if (string.Equals(usingToken.Value, "composite", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
if (steps == null)
|
if (steps == null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ namespace GitHub.Runner.Worker
|
|||||||
private readonly HashSet<string> _contextEnvWhitelist = new HashSet<string>(StringComparer.OrdinalIgnoreCase)
|
private readonly HashSet<string> _contextEnvWhitelist = new HashSet<string>(StringComparer.OrdinalIgnoreCase)
|
||||||
{
|
{
|
||||||
"action",
|
"action",
|
||||||
|
"action_path",
|
||||||
"actor",
|
"actor",
|
||||||
"api_url",
|
"api_url",
|
||||||
"base_ref",
|
"base_ref",
|
||||||
|
|||||||
@@ -56,6 +56,14 @@ namespace GitHub.Runner.Worker.Handlers
|
|||||||
childScopeName = $"__{Guid.NewGuid()}";
|
childScopeName = $"__{Guid.NewGuid()}";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Copy the github context so that we don't modify the original pointer
|
||||||
|
// We can't use PipelineContextData.Clone() since that creates a null pointer exception for copying a GitHubContext
|
||||||
|
var compositeGitHubContext = new GitHubContext();
|
||||||
|
foreach (var pair in githubContext)
|
||||||
|
{
|
||||||
|
compositeGitHubContext[pair.Key] = pair.Value;
|
||||||
|
}
|
||||||
|
|
||||||
foreach (Pipelines.ActionStep actionStep in actionSteps)
|
foreach (Pipelines.ActionStep actionStep in actionSteps)
|
||||||
{
|
{
|
||||||
var actionRunner = HostContext.CreateService<IActionRunner>();
|
var actionRunner = HostContext.CreateService<IActionRunner>();
|
||||||
@@ -64,6 +72,11 @@ namespace GitHub.Runner.Worker.Handlers
|
|||||||
actionRunner.Condition = actionStep.Condition;
|
actionRunner.Condition = actionStep.Condition;
|
||||||
|
|
||||||
var step = ExecutionContext.CreateCompositeStep(childScopeName, actionRunner, inputsData, Environment);
|
var step = ExecutionContext.CreateCompositeStep(childScopeName, actionRunner, inputsData, Environment);
|
||||||
|
|
||||||
|
// Set GITHUB_ACTION_PATH
|
||||||
|
step.ExecutionContext.ExpressionValues["github"] = compositeGitHubContext;
|
||||||
|
step.ExecutionContext.SetGitHubContext("action_path", ActionDirectory);
|
||||||
|
|
||||||
compositeSteps.Add(step);
|
compositeSteps.Add(step);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -176,9 +189,6 @@ namespace GitHub.Runner.Worker.Handlers
|
|||||||
|
|
||||||
var actionStep = step as IActionRunner;
|
var actionStep = step as IActionRunner;
|
||||||
|
|
||||||
// Set GITHUB_ACTION
|
|
||||||
step.ExecutionContext.SetGitHubContext("action", step.ExecutionContext.GetFullyQualifiedContextName());
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// Evaluate and merge action's env block to env context
|
// Evaluate and merge action's env block to env context
|
||||||
|
|||||||
@@ -164,8 +164,6 @@ namespace GitHub.Runner.Worker.Handlers
|
|||||||
string workingDirectory = null;
|
string workingDirectory = null;
|
||||||
if (!Inputs.TryGetValue("workingDirectory", out workingDirectory))
|
if (!Inputs.TryGetValue("workingDirectory", out workingDirectory))
|
||||||
{
|
{
|
||||||
// TODO: figure out how defaults interact with template later
|
|
||||||
// for now, we won't check job.defaults if we are inside a template.
|
|
||||||
if (string.IsNullOrEmpty(ExecutionContext.ScopeName) && ExecutionContext.Global.JobDefaults.TryGetValue("run", out var runDefaults))
|
if (string.IsNullOrEmpty(ExecutionContext.ScopeName) && ExecutionContext.Global.JobDefaults.TryGetValue("run", out var runDefaults))
|
||||||
{
|
{
|
||||||
if (runDefaults.TryGetValue("working-directory", out workingDirectory))
|
if (runDefaults.TryGetValue("working-directory", out workingDirectory))
|
||||||
@@ -180,8 +178,6 @@ namespace GitHub.Runner.Worker.Handlers
|
|||||||
string shell = null;
|
string shell = null;
|
||||||
if (!Inputs.TryGetValue("shell", out shell) || string.IsNullOrEmpty(shell))
|
if (!Inputs.TryGetValue("shell", out shell) || string.IsNullOrEmpty(shell))
|
||||||
{
|
{
|
||||||
// TODO: figure out how defaults interact with template later
|
|
||||||
// for now, we won't check job.defaults if we are inside a template.
|
|
||||||
if (string.IsNullOrEmpty(ExecutionContext.ScopeName) && ExecutionContext.Global.JobDefaults.TryGetValue("run", out var runDefaults))
|
if (string.IsNullOrEmpty(ExecutionContext.ScopeName) && ExecutionContext.Global.JobDefaults.TryGetValue("run", out var runDefaults))
|
||||||
{
|
{
|
||||||
if (runDefaults.TryGetValue("shell", out shell))
|
if (runDefaults.TryGetValue("shell", out shell))
|
||||||
|
|||||||
@@ -108,19 +108,26 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"composite-steps": {
|
"composite-steps": {
|
||||||
"context": [
|
|
||||||
"github",
|
|
||||||
"strategy",
|
|
||||||
"matrix",
|
|
||||||
"steps",
|
|
||||||
"inputs",
|
|
||||||
"job",
|
|
||||||
"runner",
|
|
||||||
"env",
|
|
||||||
"hashFiles(1,255)"
|
|
||||||
],
|
|
||||||
"sequence": {
|
"sequence": {
|
||||||
"item-type": "any"
|
"item-type": "composite-step"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"composite-step": {
|
||||||
|
"mapping": {
|
||||||
|
"properties": {
|
||||||
|
"name": "string-steps-context",
|
||||||
|
"id": "non-empty-string",
|
||||||
|
"run": {
|
||||||
|
"type": "string-steps-context",
|
||||||
|
"required": true
|
||||||
|
},
|
||||||
|
"env": "step-env",
|
||||||
|
"working-directory": "string-steps-context",
|
||||||
|
"shell": {
|
||||||
|
"type": "non-empty-string",
|
||||||
|
"required": true
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"container-runs-context": {
|
"container-runs-context": {
|
||||||
@@ -157,6 +164,37 @@
|
|||||||
"string": {
|
"string": {
|
||||||
"require-non-empty": true
|
"require-non-empty": true
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"string-steps-context": {
|
||||||
|
"context": [
|
||||||
|
"github",
|
||||||
|
"inputs",
|
||||||
|
"strategy",
|
||||||
|
"matrix",
|
||||||
|
"steps",
|
||||||
|
"job",
|
||||||
|
"runner",
|
||||||
|
"env",
|
||||||
|
"hashFiles(1,255)"
|
||||||
|
],
|
||||||
|
"string": {}
|
||||||
|
},
|
||||||
|
"step-env": {
|
||||||
|
"context": [
|
||||||
|
"github",
|
||||||
|
"inputs",
|
||||||
|
"strategy",
|
||||||
|
"matrix",
|
||||||
|
"steps",
|
||||||
|
"job",
|
||||||
|
"runner",
|
||||||
|
"env",
|
||||||
|
"hashFiles(1,255)"
|
||||||
|
],
|
||||||
|
"mapping": {
|
||||||
|
"loose-key-type": "non-empty-string",
|
||||||
|
"loose-value-type": "string"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1 +1 @@
|
|||||||
2.267.0
|
2.272.0
|
||||||
|
|||||||
Reference in New Issue
Block a user