File tree 4 files changed +30
-6
lines changed
4 files changed +30
-6
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- - name : Check variables (RUN ONCE)
2
+ - name : Check github_account variable (RUN ONCE)
3
3
assert :
4
4
that :
5
5
- github_account is defined
6
+ fail_msg : " github_account is not defined"
7
+ run_once : yes
8
+ tags :
9
+ - install
10
+ - uninstall
11
+
12
+ - name : Check access_token variable (RUN ONCE)
13
+ assert :
14
+ that :
6
15
- access_token is defined
7
16
- access_token | length > 0
8
- fail_msg : " access_token was not found."
17
+ - access_token | regex_search('^ghp_')
18
+ fail_msg : " access_token was not found or is using an invalid format."
19
+ run_once : yes
20
+ tags :
21
+ - install
22
+ - uninstall
23
+
24
+ - name : Check runner_org variable (RUN ONCE)
25
+ assert :
26
+ that :
27
+ - runner_org == True or runner_org == False
28
+ fail_msg : " runner_org should be a boolean value"
9
29
run_once : yes
10
30
tags :
11
31
- install
Original file line number Diff line number Diff line change 1
1
---
2
2
- block :
3
- - name : Get registration token (RUN ONCE)
3
+ - name : Get registration token for organization (RUN ONCE)
4
4
uri :
5
5
url : " {{ github_api_url }}/orgs/{{ github_owner | default(github_account) }}/actions/runners/registration-token"
6
6
headers :
15
15
- install
16
16
- uninstall
17
17
18
- - name : Check currently registered runners (RUN ONCE)
18
+ - name : Check currently registered runners for organization (RUN ONCE)
19
19
uri :
20
20
url : " {{ github_api_url }}/orgs/{{ github_owner | default(github_account) }}/actions/runners"
21
21
headers :
Original file line number Diff line number Diff line change 1
1
---
2
2
- block :
3
- - name : Get registration token (RUN ONCE)
3
+ - name : Get registration token for repo (RUN ONCE)
4
4
uri :
5
5
url : " {{ github_api_url }}/repos/{{ github_owner | default(github_account) }}/{{ github_repo }}/actions/runners/registration-token"
6
6
headers :
15
15
- install
16
16
- uninstall
17
17
18
- - name : Check currently registered runners (RUN ONCE)
18
+ - name : Check currently registered runners for repo (RUN ONCE)
19
19
uri :
20
20
url : " {{ github_api_url }}/repos/{{ github_owner | default(github_account) }}/{{ github_repo }}/actions/runners"
21
21
headers :
Original file line number Diff line number Diff line change 32
32
runner_version : " {{ api_response.json.tag_name | regex_replace('^v', '') }}"
33
33
when : runner_version == "latest"
34
34
35
+ - name : Show the runner_version
36
+ debug :
37
+ msg : " runner_version: {{ runner_version }}"
38
+
35
39
- name : Check if desired version already installed
36
40
command : " grep -i {{ runner_version }} {{ runner_dir }}/bin/Runner.Listener.deps.json"
37
41
register : runner_installed
You can’t perform that action at this time.
0 commit comments