Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: per_page github api parameter #204

Merged
merged 4 commits into from
May 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading