-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve the handling of jobs.<job_id>.if
#31070
Conversation
Whether this PR depends on a PR of act runner? |
No. We don't need to modify act_runner |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. But I'm not sure to backport it to 1.21. I'll say it's an improvement, not a bugfix, and it will change some behaviors with Actions, we need time to see how it affects.
Fix #25897
Fix #30322
#29464 cannot handle some complex
if
conditions correctly because it only checksalways()
literally. In fact, it's not easy to evaluate theif
condition on the Gitea side because evaluating it requires a series of contexts. But act_runner is able to evaluate theif
condition before running the job (for more information, seegitea/act
) . So we can use act_runner to check theif
condition.In this PR, how to handle a blocked job depends on its
needs
andif
:needs
completed successfully and the job'sif
is empty, set the job status toStatusSkipped
StatusWaiting
, and then act_runner will check theif
condition and run the job if the condition is met