Skip to content

Commit 738552b

Browse files
Merge pull request #94 from MonolithProjects/develop
Develop to Master
2 parents 52ce09e + 058d401 commit 738552b

File tree

4 files changed

+30
-6
lines changed

4 files changed

+30
-6
lines changed

tasks/assert.yml

+22-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,31 @@
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

tasks/collect_info_org.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
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:
@@ -15,7 +15,7 @@
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:

tasks/collect_info_repo.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
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:
@@ -15,7 +15,7 @@
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:

tasks/install_runner.yml

+4
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@
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

0 commit comments

Comments
 (0)