mirror of
https://github.com/actions/runner.git
synced 2025-12-11 12:57:05 +00:00
allow container to be null/empty (#266)
This commit is contained in:
@@ -154,6 +154,11 @@ namespace GitHub.DistributedTask.Pipelines.ObjectTemplating
|
|||||||
|
|
||||||
if (value is StringToken containerLiteral)
|
if (value is StringToken containerLiteral)
|
||||||
{
|
{
|
||||||
|
if (String.IsNullOrEmpty(containerLiteral.Value))
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
result.Image = containerLiteral.Value;
|
result.Image = containerLiteral.Value;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -472,7 +472,7 @@
|
|||||||
"matrix"
|
"matrix"
|
||||||
],
|
],
|
||||||
"one-of": [
|
"one-of": [
|
||||||
"non-empty-string",
|
"string",
|
||||||
"container-mapping"
|
"container-mapping"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -497,10 +497,22 @@
|
|||||||
],
|
],
|
||||||
"mapping": {
|
"mapping": {
|
||||||
"loose-key-type": "non-empty-string",
|
"loose-key-type": "non-empty-string",
|
||||||
"loose-value-type": "container"
|
"loose-value-type": "services-container"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"services-container": {
|
||||||
|
"context": [
|
||||||
|
"github",
|
||||||
|
"strategy",
|
||||||
|
"matrix"
|
||||||
|
],
|
||||||
|
"one-of": [
|
||||||
|
"non-empty-string",
|
||||||
|
"container-mapping"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
"container-env": {
|
"container-env": {
|
||||||
"mapping": {
|
"mapping": {
|
||||||
"loose-key-type": "non-empty-string",
|
"loose-key-type": "non-empty-string",
|
||||||
|
|||||||
Reference in New Issue
Block a user