1
0
Fork 0
mirror of https://code.forgejo.org/forgejo/runner.git synced 2025-08-11 17:50:58 +00:00

fix: do not fail the job when if: false (#172)

- log job result as info not as debug
- add test

---

v6.4.0 regression introduced in 4880b091a2

It did not fail a test because the [original fix](https://code.forgejo.org/forgejo/act/pulls/67/files)  has tests only for the case where a step is skipped, not when a job is skipped.

Closes forgejo/runner#660

Reviewed-on: https://code.forgejo.org/forgejo/act/pulls/172
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
This commit is contained in:
Earl Warren 2025-07-07 12:11:57 +00:00 committed by earl-warren
parent 21f71e5cdc
commit 7eb547faa5
4 changed files with 36 additions and 20 deletions

View file

@ -914,7 +914,7 @@ func (rc *RunContext) isEnabled(ctx context.Context) (bool, error) {
if !runJob {
rc.result("skipped")
l.WithField("jobResult", "skipped").Debugf("Skipping job '%s' due to '%s'", job.Name, job.If.Value)
l.WithField("jobResult", "skipped").Infof("Skipping job '%s' due to '%s'", job.Name, job.If.Value)
return false, nil
}