@@ -7,92 +7,111 @@ Automatic configuration for running GitHub Actions on Debian hosts as a service
77#### Table of Contents
88
991 . [ Description] ( #description )
10+ - [ Hiera configuration examples] ( #hiera-configuration-examples )
11+ - [ Github Enterprise examples] ( #github-enterprise-examples )
10122 . [ Limitations - OS compatibility, etc.] ( #limitations )
11133 . [ Development - Guide for contributing to the module] ( #development )
1214
1315## Description
1416
1517This module will setup all of the files and configuration needed for GitHub Actions runner to work on any Debian 9 hosts.
1618
17- ### hiera configuration
19+ ### hiera configuration examples
1820
19- This module supports configuration through hiera. The following example
20- creates repository level Actions runners.
21+ This module supports configuration through hiera.
22+
23+ #### Creating an organization level Actions runner
2124
2225``` yaml
2326github_actions_runner::ensure : present
2427github_actions_runner::base_dir_name : ' /data/actions-runner'
2528github_actions_runner::package_name : ' actions-runner-linux-x64'
26- github_actions_runner::package_ensure : ' 2.272.0 '
29+ github_actions_runner::package_ensure : ' 2.277.1 '
2730github_actions_runner::repository_url : ' https://github.com/actions/runner/releases/download'
28- github_actions_runner::org_name : ' github_org '
31+ github_actions_runner::org_name : ' my_github_organization '
2932github_actions_runner::personal_access_token : ' PAT'
3033github_actions_runner::user : ' root'
3134github_actions_runner::group : ' root'
3235github_actions_runner::instances :
33- first_instance :
36+ example_org_instance :
3437 labels :
3538 - self-hosted-custom
3639` ` `
3740
38- You can also override some of the keys on the instance level
41+ Note, your ` personal_access_token` has to contain the `admin:org` permission.
42+
43+ # ### Creating an additional repository level Actions runner
3944` ` ` yaml
40- github_actions_runner::ensure : present
41- github_actions_runner::base_dir_name : ' /data/actions-runner'
42- github_actions_runner::package_name : ' actions-runner-linux-x64'
43- github_actions_runner::package_ensure : ' 2.272.0'
44- github_actions_runner::repository_url : ' https://github.com/actions/runner/releases/download'
45- github_actions_runner::org_name : ' github_org'
46- github_actions_runner::personal_access_token : ' PAT'
47- github_actions_runner::user : ' root'
48- github_actions_runner::group : ' root'
4945github_actions_runner::instances:
50- first_instance :
46+ example_org_instance :
5147 labels:
5248 - self-hosted-custom1
53- second_instance :
49+ example_repo_instance:
50+ repo_name: myrepo
51+ labels:
52+ - self-hosted-custom2
53+ ` ` `
54+
55+ Note, your `personal_access_token` has to contain the `repo` permission.
56+
57+ # ### Instance level overwrites
58+ ` ` ` yaml
59+ github_actions_runner::instances:
60+ example_org_instance:
5461 ensure: absent
55- third_instance :
5662 labels:
57- - self-hosted-custom3
63+ - self-hosted-custom1
64+ example_repo_instance:
65+ org_name: overwritten_orgnization
5866 repo_name: myrepo
59- org_name : other_org
60- personal_access_token : other_secret
67+ labels:
68+ - self-hosted-custom2
6169` ` `
6270
63- In case you need to set proxy in one instance:
71+ # ### Adding a global proxy and overwriting an instance level proxy
6472` ` ` yaml
65- github_actions_runner::ensure : present
66- github_actions_runner::base_dir_name : ' /data/actions-runner'
67- github_actions_runner::package_name : ' actions-runner-linux-x64'
68- github_actions_runner::package_ensure : ' 2.272.0'
69- github_actions_runner::repository_url : ' https://github.com/actions/runner/releases/download'
70- github_actions_runner::org_name : ' github_org'
71- github_actions_runner::personal_access_token : ' PAT'
72- github_actions_runner::user : ' root'
73- github_actions_runner::group : ' root'
73+ github_actions_runner::http_proxy: http://proxy.local
74+ github_actions_runner::https_proxy: http://proxy.local
7475github_actions_runner::instances:
75- first_instance :
76- http_proxy : http://proxy .local
77- https_proxy : http://proxy .local
76+ example_org_instance :
77+ http_proxy: http://instance_specific_proxy .local
78+ https_proxy: http://instance_specific_proxy .local
7879 no_proxy: example.com
7980 labels:
8081 - self-hosted-custom1
8182` ` `
8283
83- In case you are using Github Enterprise Server , you can define these two parameters to specify the correct urls:
84+ # ## Github Enterprise examples
85+ To use the module with Github Enterprise Server, you have to define these parameters :
8486` ` ` yaml
8587github_actions_runner::github_domain: "https://git.example.com"
8688github_actions_runner::github_api: "https://git.example.com/api/v3"
8789` ` `
8890
91+ In addition to the runner configuration examples above, you can also configure runners
92+ on the enterprise level by setting a value for `enterprise_name`, for example :
93+ ` ` ` yaml
94+ github_actions_runner::ensure: present
95+ github_actions_runner::base_dir_name: '/data/actions-runner'
96+ github_actions_runner::package_name: 'actions-runner-linux-x64'
97+ github_actions_runner::package_ensure: '2.277.1'
98+ github_actions_runner::repository_url: 'https://github.com/actions/runner/releases/download'
99+ github_actions_runner::enterprise_name: 'enterprise_name'
100+ github_actions_runner::personal_access_token: 'PAT'
101+ github_actions_runner::user: 'root'
102+ github_actions_runner::group: 'root'
103+ github_actions_runner::instances:
104+ ` ` `
105+
106+ Note, your `personal_access_token` has to contain the `admin:enterprise` permission.
107+
89108# # Limitations
90109
91110Tested on Debian 9 stretch hosts only.
92111full list of operating systems support and requirements are described in `metadata.json` file.
93112
94113
95- If you don't specify repository name , make sure you `Personal Access Token` is org level admin.
114+
96115
97116# # Development
98117
0 commit comments