Skip to content

Commit 47da975

Browse files
committed
make source repository for downloading runner releases configurable
This allows using and updating forks of the official runner.
1 parent 3c264a9 commit 47da975

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

defaults/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ runner_name: "{{ ansible_hostname }}"
3838
# Labels to apply to the runner
3939
runner_labels: []
4040

41+
# GitHub repository where releases will be downloaded from
42+
runner_download_repository: "actions/runner"
43+
4144
# Custom service name when usign Github Enterprise server
4245
# service_name: actions.runner._services.{{ runner_name }}.service
4346

tasks/install_runner.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
- name: Find the latest runner version (RUN ONCE)
1313
uri:
14-
url: "https://api.github.com/repos/actions/runner/releases/latest"
14+
url: "https://api.github.com/repos/{{ runner_download_repository }}/releases/latest"
1515
headers:
1616
Content-Type: "application/json"
1717
method: GET
@@ -54,7 +54,7 @@
5454

5555
- name: Download runner package version - "{{ runner_version }}" (RUN ONCE)
5656
get_url:
57-
url: "https://github.com/actions/runner/releases/download/v{{ runner_version }}/\
57+
url: "https://github.com/{{ runner_download_repository }}/releases/download/v{{ runner_version }}/\
5858
actions-runner-linux-{{ github_actions_architecture }}-{{ runner_version }}.tar.gz"
5959
dest: "{{ runner_pkg_tempdir }}/actions-runner-linux-{{ runner_version }}.tar.gz"
6060
force: no

0 commit comments

Comments
 (0)