Update act to v0.243 (#54)
- Update act to v0.243.1 - Disable artifacts server when run daemon. - Adjust cmd. Reviewed-on: https://gitea.com/gitea/act_runner/pulls/54 Reviewed-by: Zettat123 <zettat123@noreply.gitea.io>
This commit is contained in:
parent
154555e912
commit
df4bfdc0d3
4 changed files with 114 additions and 794 deletions
|
@ -11,7 +11,6 @@ import (
|
|||
"time"
|
||||
|
||||
runnerv1 "code.gitea.io/actions-proto-go/runner/v1"
|
||||
"github.com/nektos/act/pkg/artifacts"
|
||||
"github.com/nektos/act/pkg/common"
|
||||
"github.com/nektos/act/pkg/model"
|
||||
"github.com/nektos/act/pkg/runner"
|
||||
|
@ -156,7 +155,6 @@ func (t *Task) Run(ctx context.Context, task *runnerv1.Task, runnerName, runnerV
|
|||
return err
|
||||
}
|
||||
|
||||
var plan *model.Plan
|
||||
jobIDs := workflow.GetJobIDs()
|
||||
if len(jobIDs) != 1 {
|
||||
err := fmt.Errorf("multiple jobs found: %v", jobIDs)
|
||||
|
@ -164,7 +162,11 @@ func (t *Task) Run(ctx context.Context, task *runnerv1.Task, runnerName, runnerV
|
|||
return err
|
||||
}
|
||||
jobID := jobIDs[0]
|
||||
plan = model.CombineWorkflowPlanner(workflow).PlanJob(jobID)
|
||||
plan, err := model.CombineWorkflowPlanner(workflow).PlanJob(jobID)
|
||||
if err != nil {
|
||||
lastWords = err.Error()
|
||||
return err
|
||||
}
|
||||
job := workflow.GetJob(jobID)
|
||||
reporter.ResetSteps(len(job.Steps))
|
||||
|
||||
|
@ -243,13 +245,7 @@ func (t *Task) Run(ctx context.Context, task *runnerv1.Task, runnerName, runnerV
|
|||
return err
|
||||
}
|
||||
|
||||
artifactCancel := artifacts.Serve(ctx, input.artifactServerPath, input.artifactServerPort)
|
||||
t.log.Debugf("artifacts server started at %s:%s", input.artifactServerPath, input.artifactServerPort)
|
||||
|
||||
executor := r.NewPlanExecutor(plan).Finally(func(ctx context.Context) error {
|
||||
artifactCancel()
|
||||
return nil
|
||||
})
|
||||
executor := r.NewPlanExecutor(plan)
|
||||
|
||||
t.log.Infof("workflow prepared")
|
||||
reporter.Logf("workflow prepared")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue