File tree Expand file tree Collapse file tree 4 files changed +30
-6
lines changed Expand file tree Collapse file tree 4 files changed +30
-6
lines changed Original file line number Diff line number Diff line change 11---
2- - name : Check variables (RUN ONCE)
2+ - name : Check github_account variable (RUN ONCE)
33 assert :
44 that :
55 - 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 :
615 - access_token is defined
716 - 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"
929 run_once : yes
1030 tags :
1131 - install
Original file line number Diff line number Diff line change 11---
22- block :
3- - name : Get registration token (RUN ONCE)
3+ - name : Get registration token for organization (RUN ONCE)
44 uri :
55 url : " {{ github_api_url }}/orgs/{{ github_owner | default(github_account) }}/actions/runners/registration-token"
66 headers :
1515 - install
1616 - uninstall
1717
18- - name : Check currently registered runners (RUN ONCE)
18+ - name : Check currently registered runners for organization (RUN ONCE)
1919 uri :
2020 url : " {{ github_api_url }}/orgs/{{ github_owner | default(github_account) }}/actions/runners"
2121 headers :
Original file line number Diff line number Diff line change 11---
22- block :
3- - name : Get registration token (RUN ONCE)
3+ - name : Get registration token for repo (RUN ONCE)
44 uri :
55 url : " {{ github_api_url }}/repos/{{ github_owner | default(github_account) }}/{{ github_repo }}/actions/runners/registration-token"
66 headers :
1515 - install
1616 - uninstall
1717
18- - name : Check currently registered runners (RUN ONCE)
18+ - name : Check currently registered runners for repo (RUN ONCE)
1919 uri :
2020 url : " {{ github_api_url }}/repos/{{ github_owner | default(github_account) }}/{{ github_repo }}/actions/runners"
2121 headers :
Original file line number Diff line number Diff line change 3232 runner_version : " {{ api_response.json.tag_name | regex_replace('^v', '') }}"
3333 when : runner_version == "latest"
3434
35+ - name : Show the runner_version
36+ debug :
37+ msg : " runner_version: {{ runner_version }}"
38+
3539- name : Check if desired version already installed
3640 command : " grep -i {{ runner_version }} {{ runner_dir }}/bin/Runner.Listener.deps.json"
3741 register : runner_installed
You can’t perform that action at this time.
0 commit comments