mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-09-15 18:57:01 +00:00
fix: keep action inputs (#1215)
Do not initialize inputs a second time (in pre and main step). When the action setup already run during pre step, we must not re-run it during the main step, otherwise the inputs will be overwritten by possible other action inputs.
This commit is contained in:
parent
ad6aeb1969
commit
6b4cd9973b
1 changed files with 56 additions and 57 deletions
|
@ -36,8 +36,7 @@ var (
|
||||||
)
|
)
|
||||||
|
|
||||||
func (sar *stepActionRemote) prepareActionExecutor() common.Executor {
|
func (sar *stepActionRemote) prepareActionExecutor() common.Executor {
|
||||||
return common.NewPipelineExecutor(
|
return func(ctx context.Context) error {
|
||||||
func(ctx context.Context) error {
|
|
||||||
if sar.remoteAction != nil && sar.action != nil {
|
if sar.remoteAction != nil && sar.action != nil {
|
||||||
// we are already good to run
|
// we are already good to run
|
||||||
return nil
|
return nil
|
||||||
|
@ -89,12 +88,12 @@ func (sar *stepActionRemote) prepareActionExecutor() common.Executor {
|
||||||
sar.action = actionModel
|
sar.action = actionModel
|
||||||
return err
|
return err
|
||||||
},
|
},
|
||||||
)(ctx)
|
|
||||||
},
|
|
||||||
func(ctx context.Context) error {
|
func(ctx context.Context) error {
|
||||||
sar.RunContext.setupActionInputs(ctx, sar)
|
sar.RunContext.setupActionInputs(ctx, sar)
|
||||||
return nil
|
return nil
|
||||||
})
|
},
|
||||||
|
)(ctx)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (sar *stepActionRemote) pre() common.Executor {
|
func (sar *stepActionRemote) pre() common.Executor {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue