diff --git a/pkg/runner/run_context.go b/pkg/runner/run_context.go index f6c1d39311d..6c8b8e9b1ff 100644 --- a/pkg/runner/run_context.go +++ b/pkg/runner/run_context.go @@ -535,17 +535,17 @@ func (rc *RunContext) isEnabled(ctx context.Context) (bool, error) { return false, fmt.Errorf(" \u274C Error in if-expression: \"if: %s\" (%s)", job.If.Value, runJobErr) } - if !runJob { - l.WithField("jobResult", "skipped").Debugf("Skipping job '%s' due to '%s'", job.Name, job.If.Value) - return false, nil - } - if jobType == model.JobTypeInvalid { return false, jobTypeErr } else if jobType != model.JobTypeDefault { return true, nil } + if !runJob { + l.WithField("jobResult", "skipped").Debugf("Skipping job '%s' due to '%s'", job.Name, job.If.Value) + return false, nil + } + img := rc.platformImage(ctx) if img == "" { if job.RunsOn() == nil {