Allow runner registration using config file
Status update (2023-06-08)
The new method to generate runner tokens is now available. The registration token method is deprecated.
The manual isn't really clear whether the config.toml is meant to be edited by user or whether it's only generated by gitlab-runner. It seems you can run the gitlab-runner with a toml file, but you cannot register to a GitLab instance using it. It would be great if you could not only put the runner token into the config, but a registration-token, which is automatically used for registration. Same applies for URL, docker options etc. None of the options are read when registering.
In case the toml file is meant only for persisting a registration, please offer a means of registering without providing dozens of command line params or environment vars.
This issue is especially interesting for full automation of the gitlab runner in docker. The official gitlab/gitlab-runner image does a
gitlab-runner run ... as entry point, but there's no option to register prior to that.