refactor functions

This commit is contained in:
Lunny Xiao authored and Jason Song committed 2022-11-24 15:36:21 +08:00
1 parent 5903c08c14
commit c7cb750616
2 files changed
+111 -98

No files matched your search

+1 -5
View File
@@ -7,7 +7,6 @@ import (
"path/filepath"
"github.com/nektos/act/pkg/artifacts"
"github.com/nektos/act/pkg/common"
"github.com/nektos/act/pkg/model"
"github.com/nektos/act/pkg/runner"
"github.com/rs/zerolog/log"
@@ -193,10 +192,7 @@ func runTask(ctx context.Context, input *Input, jobID string) error {
return fmt.Errorf("New config failed: %v", err)
}
log := logrus.StandardLogger()
log.AddHook(&StepHook{})
ctx = common.WithLogger(ctx, log)
logrus.AddHook(&StepHook{})
cancel := artifacts.Serve(ctx, input.artifactServerPath, input.artifactServerPort)