forgejo/models/actions
Manuel Ganter 5b6bbabd74 feat: implement ephemeral runners (#9962)
As described in [this comment](https://gitea.com/gitea/act_runner/issues/19#issuecomment-739221) one-job runners are not secure when running in host mode. We implemented a routine preventing runner tokens from receiving a second job in order to render a potentially compromised token useless. Also we implemented a routine that removes finished runners as soon as possible.

Big thanks to [ChristopherHX](https://github.com/ChristopherHX) who did all the work for gitea!

Rel: #9407

## Checklist

The [contributor guide](https://forgejo.org/docs/next/contributor/) contains information that will be helpful to first time contributors. There also are a few [conditions for merging Pull Requests in Forgejo repositories](https://codeberg.org/forgejo/governance/src/branch/main/PullRequestsAgreement.md). You are also welcome to join the [Forgejo development chatroom](https://matrix.to/#/#forgejo-development:matrix.org).

### Tests

- I added test coverage for Go changes...
  - [ ] in their respective `*_test.go` for unit tests.
  - [x] in the `tests/integration` directory if it involves interactions with a live Forgejo server.
- I added test coverage for JavaScript changes...
  - [ ] in `web_src/js/*.test.js` if it can be unit tested.
  - [ ] in `tests/e2e/*.test.e2e.js` if it requires interactions with a live Forgejo server (see also the [developer guide for JavaScript testing](https://codeberg.org/forgejo/forgejo/src/branch/forgejo/tests/e2e/README.md#end-to-end-tests)).

### Documentation

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

### Release notes

- [ ] I do not want this change to show in the release notes.
- [ ] I want the title to show in the release notes with a link to this pull request.
- [ ] I want the content of the `release-notes/<pull request number>.md` to be be used for the release notes instead of the title.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/9962
Reviewed-by: Andreas Ahlenstorf <aahlenst@noreply.codeberg.org>
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.codeberg.org>
Co-authored-by: Manuel Ganter <manuel.ganter@think-ahead.tech>
Co-committed-by: Manuel Ganter <manuel.ganter@think-ahead.tech>
2026-02-16 18:56:56 +01:00
..
artifact.go feat: artifacts can be downloaded using their id instead of their name (#8957) 2025-08-25 15:51:26 +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 feat: support reusable workflow expansion when with or strategy.matrix contains ${{ needs... }} (#10647) 2025-12-31 19:04:35 +01: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 fix: empty dynamic matrix can leave action run hanging incomplete (#11063) 2026-01-27 17:10:59 +01:00
run_job.go fix: newly expanded dynamic matrix jobs can become stuck in a 'blocked' state (#11184) 2026-02-07 14:36:49 +01:00
run_job_list.go refactor: replace Value() from Option[T] with Get() & ValueOrZeroValue() (#11218) 2026-02-10 16:41:21 +01:00
run_job_status_test.go Improve Actions status aggregations (#32860) 2024-12-22 08:46:38 +01:00
run_job_test.go fix: newly expanded dynamic matrix jobs can become stuck in a 'blocked' state (#11184) 2026-02-07 14:36:49 +01:00
run_list.go feat(ui): support additional job status selection in dropdown menu on Actions tab (#11156) 2026-02-11 03:22:53 +01: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 fix: empty dynamic matrix can leave action run hanging incomplete (#11063) 2026-01-27 17:10:59 +01:00
runner.go feat: implement ephemeral runners (#9962) 2026-02-16 18:56:56 +01:00
runner_list.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
runner_test.go chore: increase test coverage of runner management (#10490) 2025-12-20 15:29:40 +01:00
runner_token.go feat: add foreign keys to the action_runner_token table (#10756) 2026-01-12 21:59:40 +01:00
runner_token_test.go feat: add foreign keys to the action_runner_token table (#10756) 2026-01-12 21:59:40 +01:00
schedule.go feat(actions): make GITHUB_WORKFLOW_REF available (#10276) 2025-12-17 23:15:26 +01:00
schedule_spec.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
schedule_spec_list.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
schedule_spec_test.go Use UTC as default timezone when schedule Actions cron tasks (#31742) 2024-08-04 18:24:10 +02:00
status.go chore: use code.forgejo.org/forgejo/actions-proto (#9981) 2025-11-05 16:10:52 +01:00
task.go feat: implement ephemeral runners (#9962) 2026-02-16 18:56:56 +01:00
task_list.go refactor: replace Value() from Option[T] with Get() & ValueOrZeroValue() (#11218) 2026-02-10 16:41:21 +01: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: re-running an expanded reusable workflow causes duplicate "attempt 1" job (#10666) 2026-01-02 15:26:11 +01: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