Skip to content

Commit 918c748

Browse files
Merge pull request #120 from daltonv/dv_runner_group
Add runner group option
2 parents 15ebd69 + 7765da6 commit 918c748

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ runner_org: no
8383
# Labels to apply to the runner
8484
runner_labels: []
8585

86+
# Group to add organization runner to
87+
runner_group: ""
88+
8689
# GitHub Actions Runner repository (change it if you want to use custom Actions Runner fork)
8790
runner_download_repository: "actions/runner"
8891

defaults/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ runner_org: no
3535
# Labels to apply to the runner
3636
runner_labels: []
3737

38+
# Group to add organization runner to
39+
runner_group: ""
40+
3841
# GitHub Actions Runner repository (change it if you want to use custom Actions Runner fork)
3942
runner_download_repository: "actions/runner"
4043

tasks/install_runner.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@
110110
- name: Register runner (if new installation) for organization
111111
command:
112112
"{{ runner_dir }}/./config.sh --url {{ github_url }}/{{ github_owner | default(github_account) }} \
113-
--token {{ registration.json.token }} --name {{ runner_name }} --labels {{ runner_labels | join(',') }} --unattended \
113+
--token {{ registration.json.token }} --name {{ runner_name }} --labels {{ runner_labels | join(',') }} \
114+
--runnergroup {{ runner_group }} --unattended \
114115
{{ runner_extra_config_args }}"
115116
args:
116117
chdir: "{{ runner_dir }}"
@@ -138,8 +139,8 @@
138139
- name: Replace registered runner for organization
139140
command:
140141
"{{ runner_dir }}/config.sh --url {{ github_url }}/{{ github_owner | default(github_account) }} \
141-
--token {{ registration.json.token }} --name {{ runner_name }} --labels {{ runner_labels | join(',') }} --unattended \
142-
{{ runner_extra_config_args }} --replace"
142+
--token {{ registration.json.token }} --name {{ runner_name }} --labels {{ runner_labels | join(',') }} \
143+
--runnergroup {{ runner_group }} --unattended {{ runner_extra_config_args }} --replace"
143144
args:
144145
chdir: "{{ runner_dir }}"
145146
become: yes

0 commit comments

Comments
 (0)