mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-09-15 18:57:01 +00:00
Evaluate if condition when calling a reusable workflow (#2087)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: ChristopherHX <christopher.homberger@web.de>
This commit is contained in:
parent
0956a75aca
commit
21fcd3b3dd
2 changed files with 15 additions and 2 deletions
|
@ -691,8 +691,6 @@ func (rc *RunContext) isEnabled(ctx context.Context) (bool, error) {
|
|||
|
||||
if jobType == model.JobTypeInvalid {
|
||||
return false, jobTypeErr
|
||||
} else if jobType != model.JobTypeDefault {
|
||||
return true, nil
|
||||
}
|
||||
|
||||
if !runJob {
|
||||
|
@ -700,6 +698,10 @@ func (rc *RunContext) isEnabled(ctx context.Context) (bool, error) {
|
|||
return false, nil
|
||||
}
|
||||
|
||||
if jobType != model.JobTypeDefault {
|
||||
return true, nil
|
||||
}
|
||||
|
||||
img := rc.platformImage(ctx)
|
||||
if img == "" {
|
||||
for _, platformName := range rc.runsOnPlatformNames(ctx) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue