Skip to content

Commit 4792702

Browse files
Change auth method
1 parent 00d8296 commit 4792702

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

tasks/collect_info.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@
22
- name: Get registration token (RUN ONCE)
33
uri:
44
url: "https://api.github.com/repos/{{ github_owner | default(github_account) }}/{{ github_repo }}/actions/runners/registration-token"
5-
user: ""
6-
password: "{{ access_token }}"
5+
# user: ""
6+
# password: "{{ access_token }}"
7+
headers:
8+
api_keys: "{{ access_token }}"
9+
Accept: application/vnd.github.v3+json""
710
method: POST
811
status_code: 201
912
force_basic_auth: yes
@@ -16,8 +19,11 @@
1619
- name: Check currently registered runners (RUN ONCE)
1720
uri:
1821
url: "https://api.github.com/repos/{{ github_owner | default(github_account) }}/{{ github_repo }}/actions/runners"
19-
user: ""
20-
password: "{{ access_token }}"
22+
# user: ""
23+
# password: "{{ access_token }}"
24+
headers:
25+
api_keys: "{{ access_token }}"
26+
Accept: application/vnd.github.v3+json""
2127
method: GET
2228
status_code: 200
2329
force_basic_auth: yes

tasks/install_runner.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,11 @@
1313
- name: Find the latest runner version (RUN ONCE)
1414
uri:
1515
url: "https://api.github.com/repos/actions/runner/releases/latest"
16-
url_username: ""
17-
url_password: "{{ access_token }}"
16+
# url_username: " "
17+
# url_password: "{{ access_token }}"
18+
headers:
19+
api_keys: "{{ access_token }}"
20+
Accept: application/vnd.github.v3+json""
1821
method: GET
1922
force_basic_auth: yes
2023
return_content: yes

0 commit comments

Comments
 (0)