gitforge/models/actions
Mathieu Fenniak 6b3359f016 feat: evaluate action job's if on the server-side when possible (#13030)
Fixes #12937.

The intent of this change is to allow Forgejo to evaluate `if` without having to send jobs to a runner.  When you send a job to a runner just for it to return "skipped!", it takes up 1 runner capacity for a `fetch_interval` period, which can be avoided if Forgejo can evaluate the `if` condition itself.

### Tests for Go changes

- I added test coverage for Go changes...
  - [x] in their respective `*_test.go` for unit tests.
  - [x] in the `tests/integration` directory if it involves interactions with a live Forgejo server.
- I ran...
  - [x] `make pr-go` before pushing

### Documentation

- [ ] I created a pull request [to the documentation](https://codeberg.org/forgejo/docs) to explain to Forgejo users how to use this change.
- [x] I did not document these changes and I do not expect someone else to do it.

### Release notes

- [x] This change will be noticed by a Forgejo user or admin (feature, bug fix, performance, etc.). I suggest to include a release note for this change.
- [ ] This change is not visible to a Forgejo user or admin (refactor, dependency upgrade, etc.). I think there is no need to add a release note for this change.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/13030
Reviewed-by: Andreas Ahlenstorf <aahlenst@noreply.codeberg.org>
2026-06-16 00:02:57 +02:00
..
TestActionTask_GetTasksByRunnerRequestKey fix: allow Actions runner to recover tasks lost during fetching from intermittent errors (#11401) 2026-02-22 23:24:38 +01:00
TestRunner_FindRunnerOptionsToConds refactor: replace WithAvailable with WithVisible when fetching runners (#11657) 2026-03-13 01:43:32 +01:00
TestRunner_GetVisibleRunnerByID refactor: replace WithAvailable with WithVisible when fetching runners (#11657) 2026-03-13 01:43:32 +01:00
artifact.go feat: make it possible to remove workflow runs (#12478) 2026-05-11 16:02:36 +02:00
forgejo.go feat: implement ephemeral runners (#9962) 2026-02-16 18:56:56 +01:00
forgejo_test.go feat: implement ephemeral runners (#9962) 2026-02-16 18:56:56 +01:00
main_test.go feat: ability to view previous logs for Actions runs that have been retried (#9017) 2025-09-04 22:46:22 +02:00
pre_execution_errors.go fix: prevent jobs with unknown needs from running (#12046) 2026-04-10 15:40:08 +02:00
pre_execution_errors_test.go feat: support reusable workflow expansion when with or strategy.matrix contains ${{ needs... }} (#10647) 2025-12-31 19:04:35 +01:00
run.go feat: evaluate action job's if on the server-side when possible (#13030) 2026-06-16 00:02:57 +02:00
run_job.go fix: do not hide previous attempts without task for latest attempt (#12779) 2026-05-28 15:16:48 +02:00
run_job_list.go chore: flag suspicious OwnerID comparisons (#12184) 2026-04-19 04:24:09 +02:00
run_job_list_test.go fix: prevent jobs with unknown needs from running (#12046) 2026-04-10 15:40:08 +02:00
run_job_status_test.go Improve Actions status aggregations (#32860) 2024-12-22 08:46:38 +01:00
run_job_test.go fix: do not hide previous attempts without task for latest attempt (#12779) 2026-05-28 15:16:48 +02:00
run_list.go chore: flag suspicious OwnerID comparisons (#12184) 2026-04-19 04:24:09 +02:00
run_list_test.go feat(ui): support additional job status selection in dropdown menu on Actions tab (#11156) 2026-02-11 03:22:53 +01:00
run_test.go feat: evaluate action job's if on the server-side when possible (#13030) 2026-06-16 00:02:57 +02:00
runner.go feat: make it possible to remove workflow runs (#12478) 2026-05-11 16:02:36 +02:00
runner_list.go chore: flag suspicious OwnerID comparisons (#12184) 2026-04-19 04:24:09 +02:00
runner_test.go feat: make it possible to remove workflow runs (#12478) 2026-05-11 16:02:36 +02:00
runner_token.go refactor: replace ActionRunnerToken.OwnerID & RepoID with optional.Option[int64] (#11601) 2026-03-10 03:19:16 +01:00
runner_token_test.go refactor: replace ActionRunnerToken.OwnerID & RepoID with optional.Option[int64] (#11601) 2026-03-10 03:19:16 +01:00
schedule.go chore: flag suspicious OwnerID comparisons (#12184) 2026-04-19 04:24:09 +02:00
schedule_spec.go chore: replace github.com/robfig/cron/v3 (#12365) 2026-05-01 22:07:22 +02:00
schedule_spec_list.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
schedule_spec_test.go test: fix test that was supposed to test DST behaviour but did not (#12007) 2026-04-07 05:03:26 +02:00
schedule_test.go fix: use proper ${{ forgejo.ref }} in scheduled workflows (#13081) 2026-06-15 04:15:07 +02:00
status.go chore: add modernizer linter (#11936) 2026-04-02 03:29:37 +02:00
task.go fix: do not try to remove task logs that don't exist (#13040) 2026-06-11 02:03:05 +02:00
task_list.go chore: flag suspicious OwnerID comparisons (#12184) 2026-04-19 04:24:09 +02:00
task_output.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
task_step.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
task_test.go fix: do not hide previous attempts without task for latest attempt (#12779) 2026-05-28 15:16:48 +02:00
tasks_version.go chore: fix typos throughout the codebase (#10753) 2026-01-26 22:57:33 +01:00
user.go feat: add ActionUser model & fields to ActionRun 2025-11-06 11:07:38 +01:00
user_test.go feat: add ActionUser model & fields to ActionRun 2025-11-06 11:07:38 +01:00
utils.go chore: unify the usage of CryptoRandomString (#10110) 2025-11-15 13:24:53 +01:00
utils_test.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
variable.go fix: include variable values in /repos/.../actions/variables API response (#10036) 2025-11-10 23:07:32 +01:00