dagger do action options flags

Signed-off-by: Joel Longtine <joel@dagger.io>
This commit is contained in:
Joel Longtine
2022-03-28 13:47:42 -06:00
parent 069227e30c
commit dae0ee1d1e
10 changed files with 341 additions and 46 deletions

View File

@@ -191,18 +191,20 @@ func (p *Plan) fillAction() {
noOpRunner,
)
p.action = &Action{
Name: ActionSelector.String(),
Hidden: false,
Path: cue.MakePath(ActionSelector),
Children: []*Action{},
}
actions := p.source.LookupPath(cue.MakePath(ActionSelector))
actionsPath := cue.MakePath(ActionSelector)
actions := p.source.LookupPath(actionsPath)
if !actions.Exists() {
return
}
p.action.Documentation = actions.DocSummary()
p.action = &Action{
Name: ActionSelector.String(),
Documentation: actions.DocSummary(),
Hidden: false,
Path: actionsPath,
Children: []*Action{},
Value: p.Source().LookupPath(actionsPath),
}
tasks := flow.Tasks()
@@ -221,6 +223,7 @@ func (p *Plan) fillAction() {
Path: path,
Documentation: v.DocSummary(),
Children: []*Action{},
Value: v,
}
prevAction.AddChild(a)
}