@@ -7,92 +7,111 @@ Automatic configuration for running GitHub Actions on Debian hosts as a service
7
7
#### Table of Contents
8
8
9
9
1 . [ Description] ( #description )
10
+ - [ Hiera configuration examples] ( #hiera-configuration-examples )
11
+ - [ Github Enterprise examples] ( #github-enterprise-examples )
10
12
2 . [ Limitations - OS compatibility, etc.] ( #limitations )
11
13
3 . [ Development - Guide for contributing to the module] ( #development )
12
14
13
15
## Description
14
16
15
17
This module will setup all of the files and configuration needed for GitHub Actions runner to work on any Debian 9 hosts.
16
18
17
- ### hiera configuration
19
+ ### hiera configuration examples
18
20
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
21
24
22
25
``` yaml
23
26
github_actions_runner::ensure : present
24
27
github_actions_runner::base_dir_name : ' /data/actions-runner'
25
28
github_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 '
27
30
github_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 '
29
32
github_actions_runner::personal_access_token : ' PAT'
30
33
github_actions_runner::user : ' root'
31
34
github_actions_runner::group : ' root'
32
35
github_actions_runner::instances :
33
- first_instance :
36
+ example_org_instance :
34
37
labels :
35
38
- self-hosted-custom
36
39
` ` `
37
40
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
39
44
` ` ` 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'
49
45
github_actions_runner::instances:
50
- first_instance :
46
+ example_org_instance :
51
47
labels:
52
48
- 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:
54
61
ensure: absent
55
- third_instance :
56
62
labels:
57
- - self-hosted-custom3
63
+ - self-hosted-custom1
64
+ example_repo_instance:
65
+ org_name: overwritten_orgnization
58
66
repo_name: myrepo
59
- org_name : other_org
60
- personal_access_token : other_secret
67
+ labels:
68
+ - self-hosted-custom2
61
69
` ` `
62
70
63
- In case you need to set proxy in one instance:
71
+ # ### Adding a global proxy and overwriting an instance level proxy
64
72
` ` ` 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
74
75
github_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
78
79
no_proxy: example.com
79
80
labels:
80
81
- self-hosted-custom1
81
82
` ` `
82
83
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 :
84
86
` ` ` yaml
85
87
github_actions_runner::github_domain: "https://git.example.com"
86
88
github_actions_runner::github_api: "https://git.example.com/api/v3"
87
89
` ` `
88
90
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
+
89
108
# # Limitations
90
109
91
110
Tested on Debian 9 stretch hosts only.
92
111
full list of operating systems support and requirements are described in `metadata.json` file.
93
112
94
113
95
- If you don't specify repository name , make sure you `Personal Access Token` is org level admin.
114
+
96
115
97
116
# # Development
98
117
0 commit comments