fix: dryrun skip local actions + enable Tests (#1199)
* Update step_action_local.go * Enable Tests for DRYRUN * Update runner_test.go * Update runner_test.go * Move DRYRUN Test in it's own function Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
@@ -28,6 +28,9 @@ func (sal *stepActionLocal) pre() common.Executor {
|
||||
sal.env = map[string]string{}
|
||||
|
||||
return func(ctx context.Context) error {
|
||||
if common.Dryrun(ctx) {
|
||||
return nil
|
||||
}
|
||||
actionDir := filepath.Join(sal.getRunContext().Config.Workdir, sal.Step.Uses)
|
||||
|
||||
localReader := func(ctx context.Context) actionYamlReader {
|
||||
@@ -65,6 +68,9 @@ func (sal *stepActionLocal) pre() common.Executor {
|
||||
|
||||
func (sal *stepActionLocal) main() common.Executor {
|
||||
return runStepExecutor(sal, stepStageMain, func(ctx context.Context) error {
|
||||
if common.Dryrun(ctx) {
|
||||
return nil
|
||||
}
|
||||
actionDir := filepath.Join(sal.getRunContext().Config.Workdir, sal.Step.Uses)
|
||||
return sal.runAction(sal, actionDir, nil)(ctx)
|
||||
})
|
||||
|
Reference in New Issue
Block a user