Skip to content

Commit

Permalink
Merge pull request #204 from MonolithProjects/feat/api_runners_per_page
Browse files Browse the repository at this point in the history
feat: per_page github api parameter
  • Loading branch information
MonolithProjects authored May 1, 2024
2 parents 588671f + cde8770 commit bac52df
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ This is a copy from `defaults/main.yml`
```yaml
---
# Runner user - user under which is the local runner service running
runner_user: "{{ lookup('env','USER') }}"
runner_user: "{{ lookup('env', 'USER') }}"

# Directory where the local runner will be installed
runner_dir: /opt/actions-runner
Expand All @@ -72,22 +72,25 @@ runner_version: "latest"
runner_state: "started"

# If found on the server, delete already existing runner service and install it again
reinstall_runner: no
reinstall_runner: false

# Do not show Ansible logs which may contain sensitive data (registration token)
hide_sensitive_logs: yes
hide_sensitive_logs: true

# GitHub address
github_url: "https://github.com"

# GitHub API
github_api_url: "https://api.github.com"

# Number of runners to list per page
github_api_runners_per_page: 100

# Personal Access Token for your GitHub account
access_token: "{{ lookup('env', 'PERSONAL_ACCESS_TOKEN') }}"

# Is it the runner for organization or not?
runner_org: no
runner_org: false

# Labels to apply to the runner
runner_labels: []
Expand Down
3 changes: 3 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ github_url: "https://github.com"
# GitHub API
github_api_url: "https://api.github.com"

# Number of runners to list per page
github_api_runners_per_page: 100

# Personal Access Token for your GitHub account
access_token: "{{ lookup('env', 'PERSONAL_ACCESS_TOKEN') }}"

Expand Down
3 changes: 3 additions & 0 deletions tasks/collect_info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
Authorization: "token {{ access_token }}"
Accept: "application/vnd.github.v3+json"
method: GET
body_format: form-urlencoded
body:
per_page: "{{ github_api_runners_per_page }}"
status_code: 200
force_basic_auth: true
register: registered_runners
Expand Down

0 comments on commit bac52df

Please sign in to comment.