You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gitea/services/actions
Zettat123 31a0c4dfb4
Improve the handling of `jobs.<job_id>.if` (#31070)
Fix #25897
Fix #30322

#29464 cannot handle some complex `if` conditions correctly because it
only checks `always()` literally. In fact, it's not easy to evaluate the
`if` condition on the Gitea side because evaluating it requires a series
of contexts. But act_runner is able to evaluate the `if` condition
before running the job (for more information, see
[`gitea/act`](517d11c671/pkg/runner/run_context.go (L739-L753)))
. So we can use act_runner to check the `if` condition.

In this PR, how to handle a blocked job depends on its `needs` and `if`:
- If not all jobs in `needs` completed successfully and the job's `if`
is empty, set the job status to `StatusSkipped`
- In other cases, the job status will be set to `StatusWaiting`, and
then act_runner will check the `if` condition and run the job if the
condition is met
8 months ago
..
auth.go Add ac claim for old docker/build-push-action@v3 / current buildx gha cache (#29584) 11 months ago
auth_test.go Add `interface{}` to `any` replacement to `make fmt`, exclude `*.pb.go` (#30461) 10 months ago
cleanup.go Expire artifacts before deleting them physically (#29241) 12 months ago
clear_tasks.go Use db.Find instead of writing methods for every object (#28084) 1 year ago
commit_status.go Add commit status summary table to reduce query from commit status table (#30223) 10 months ago
init.go Move notification interface to services layer (#26915) 1 year ago
interface.go feat(api): enhance Actions Secrets Management API for repository (#30656) 9 months ago
job_emitter.go Improve the handling of `jobs.<job_id>.if` (#31070) 8 months ago
job_emitter_test.go Improve the handling of `jobs.<job_id>.if` (#31070) 8 months ago
notifier.go Fix missed doer (#30231) 10 months ago
notifier_helper.go Enable more `revive` linter rules (#30608) 9 months ago
rerun.go Fix bugs in rerunning jobs (#29955) 11 months ago
rerun_test.go Fix bugs in rerunning jobs (#29955) 11 months ago
schedule_tasks.go Interpolate runs-on with variables when scheduling tasks (#30640) 9 months ago
variables.go Add API for `Variables` (#29520) 10 months ago