Skip to content
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ github_runner_non_java_image | the non-java/android runner image
github_runner_env_file | whether to use an env file for passing extra environment variables into the runner container (defaults to false)
github_runner_env_filename | the filename of the env file for passing extra environment variables into the container (defaults to ".env")
github_runner_github_host | The GITHUB_HOST used for registering the runner (defaults to "github.com")
github_runner_persist_config | whether to persist runner configuration across container restarts using a named volume (defaults to true)

Notes: the env file lets you do things like set site-specific credentials into the runner that can be built into the code
at build time, for instance, Wi-Fi credentials that can be built into tests that are specific to the location of
Expand Down
2 changes: 1 addition & 1 deletion galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ description: "Installs github self hosted repo or org runners within a docker co
can be a vanilla runner, or one with java / android installed."
license_file: LICENSE
readme: README.md
version: 0.1.0
version: 0.1.1
repository: https://github.com/compscidr/ansible-github-runner
tags:
- github
Expand Down
2 changes: 2 additions & 0 deletions roles/github_runner/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ github_runner_env_filename: ".env"
github_runner_adb_port: 5037

github_runner_github_host: "github.com"

github_runner_persist_config: true
6 changes: 5 additions & 1 deletion roles/github_runner/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
runner_volumes: >-
{{
['/var/run/docker.sock:/var/run/docker.sock'] +
(['/root/.android:/root/.android'] if github_runner_android else [])
(['/root/.android:/root/.android'] if github_runner_android else []) +
([github_runner_name ~ '-runner-data:/runner-data'] if github_runner_persist_config else [])
Copy link

Copilot AI Jan 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new persistence feature introduced in this PR is not covered by any test scenarios. Consider adding test coverage to verify that:

  1. The named volume is correctly mounted when github_runner_persist_config is true
  2. The CONFIGURED_ACTIONS_RUNNER_FILES_DIR environment variable is set when persistence is enabled
  3. The volume and environment variable are not present when github_runner_persist_config is false

This is particularly important since this feature aims to fix an infinite retry loop issue after machine restarts.

Copilot uses AI. Check for mistakes.
}}
runner_env: >-
{{
Expand All @@ -34,5 +35,8 @@
) | combine(
{'RUNNER_SCOPE': 'org', 'ORG_NAME': github_runner_org_name}
if github_runner_org else {}
) | combine(
{'CONFIGURED_ACTIONS_RUNNER_FILES_DIR': '/runner-data'}
if github_runner_persist_config else {}
)
}}