Using a Configuration File - testflows/TestFlows-GitHub-Hetzner-Runners GitHub Wiki
Instead of passing configuration options using command-line arguments, you can use configuration file. The configuration file uses YAML format, and it is usually named config.yaml. You can find the complete schema in schema.json.
✋ Note: | When you mix command-line options with a custom configuration file, explicit command-line options take precedence over the values that are defined for the same parameters in the configuration file. |
---|
You can specify the default configuration by placing the configuration in the ~/.github-hetzner-runners/config.yaml file or pass the path to the configuration file explicitly using the -c path, --config path option.
The YAML configuration file supports special syntax to specify the value of a property as the value of the environment variable using the ${ENV_VAR_NAME} syntax.
For example,
github-hetzner-runners -c config.yaml
where,
config.yaml: |
config:
github_token: ${GITHUB_TOKEN}
github_repository: ${GITHUB_REPOSITORY}
hetzner_token: ${HETZNER_TOKEN}
default_server_type: cx22
cloud:
server_name: "my-github-hetzner-runners-service"
standby_runners:
- labels:
- self-hosted
- type-cx22
count: 2
replenish_immediately: true |
---|---|
✋ Note: |
This is a simple configuration file. You can find a complete example in the examples/config.yaml. |