main.ymlΒΆ

---
application_id: svc-runner
RUNNER_USER: "{{ lookup('users', 'github-runner').username }}"
RUNNER_UID: "{{ lookup('users', 'github-runner').uid }}"
RUNNER_GID: "{{ lookup('users', 'github-runner').gid }}"
RUNNER_DOCKER_BASE: "{{ lookup('config', application_id, 'services.runner.docker_base') }}"
RUNNER_PROJECT_PREFIX: "{{ lookup('config', application_id, 'services.runner.project_prefix') }}"
RUNNER_SYSCTL_CONF: "{{ lookup('config', application_id, 'services.runner.sysctl_conf') }}"
RUNNER_IMAGE_NAME: "{{ lookup('config', application_id, 'services.runner.image_name') }}"
RUNNER_IMAGE_TAG: "{{ lookup('config', application_id, 'services.runner.image_tag') }}"
RUNNER_IMAGE_REF: "{{ SWARM_REGISTRY_PREFIX }}{{ RUNNER_IMAGE_NAME }}:{{ RUNNER_IMAGE_TAG }}"
RUNNER_INSTALL_DIR: "{{ lookup('config', application_id, 'services.runner.install_dir') }}"
RUNNER_CPUS: "{{ lookup('cpus', application_id, 'runner') | int }}"
RUNNER_BASE_IMAGE: "{{ lookup('config', application_id, 'services.runner.image') }}:{{ lookup('config', application_id, 'services.runner.version') }}"
RUNNER_DOCKER_GID_FALLBACK: "{{ lookup('config', application_id, 'services.runner.docker_gid_fallback') }}"
RUNNER_GITHUB_OWNER: "{{ lookup('env', 'GITHUB_REPOSITORY_OWNER') | default(lookup('config', application_id, 'services.runner.github_owner'), true) }}"
RUNNER_GITHUB_REPO: "{{ (lookup('env', 'GITHUB_REPOSITORY') | split('/') | last) | default(lookup('config', application_id, 'services.runner.github_repo'), true)
  }}"
RUNNER_API_TOKEN: "{{ lookup('env', 'GH_TOKEN') | default(lookup('env', 'GITHUB_TOKEN'), true) }}"
RUNNER_GIT_REF: "{{ lookup('env', 'GITHUB_REF_NAME') | default('main', true) }}"