Skip to content

Commit

Permalink
feat: interpolate the step names
Browse files Browse the repository at this point in the history
Step names could contain expressions refering to event data.

Fixes nektos#1353
  • Loading branch information
KnisterPeter authored and github-actions committed Nov 10, 2022
1 parent 24fe3d5 commit 40cae52
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/runner/job_executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ func newJobExecutor(info jobInfo, sf stepFactory, rc *RunContext) common.Executo

func useStepLogger(rc *RunContext, stepModel *model.Step, stage stepStage, executor common.Executor) common.Executor {
return func(ctx context.Context) error {
ctx = withStepLogger(ctx, stepModel.ID, stepModel.String(), stage.String())
ctx = withStepLogger(ctx, stepModel.ID, rc.ExprEval.Interpolate(ctx, stepModel.String()), stage.String())

rawLogger := common.Logger(ctx).WithField("raw_output", true)
logWriter := common.NewLineWriter(rc.commandHandler(ctx), func(s string) bool {
Expand Down
2 changes: 1 addition & 1 deletion pkg/runner/step.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func runStepExecutor(step step, stage stepStage, executor common.Executor) commo
return nil
}

stepString := stepModel.String()
stepString := rc.ExprEval.Interpolate(ctx, stepModel.String())
if strings.Contains(stepString, "::add-mask::") {
stepString = "add-mask command"
}
Expand Down

0 comments on commit 40cae52

Please sign in to comment.