mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-20 20:07:03 +01:00
320ab7ed7f
This commit allows the `forgejo-cli actions register` command to change an existing runner's secret, as discussed in #4610. It refactors `RegisterRunner` to extract the code that hashes the token, moving this code to a method called `UpdateSecret` on `ActionRunner`. A test for the method has been added. The `RegisterRunner` function is updated so that: - it relies on `ActionRunner.UpdateSecret` when creating new runners, - it checks whether an existing runner's secret still matches the one passed on the command line, - it updates the runner's secret if it wasn't created and it no longer matches. A test has been added for the new behaviour. |
||
---|---|---|
.. | ||
artifact.go | ||
forgejo.go | ||
forgejo_test.go | ||
main_test.go | ||
run.go | ||
run_job.go | ||
run_job_list.go | ||
run_list.go | ||
runner.go | ||
runner_list.go | ||
runner_test.go | ||
runner_token.go | ||
runner_token_test.go | ||
schedule.go | ||
schedule_list.go | ||
schedule_spec.go | ||
schedule_spec_list.go | ||
status.go | ||
task.go | ||
task_list.go | ||
task_output.go | ||
task_step.go | ||
tasks_version.go | ||
utils.go | ||
utils_test.go | ||
variable.go |