github_actions_runner

pdk
Module to configure our GitHub Actions runner on Debian hosts

Novum-Lifecycle

telefonica

1,500 downloads

252 latest version

5.0 quality score

Version information

  • 0.4.0 (latest)
  • 0.3.0
  • 0.2.4
  • 0.2.3
  • 0.2.2
released Feb 22nd 2021
This version is compatible with:
  • Puppet Enterprise 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2016.4.x
  • Puppet >= 4.10.0 < 7.0.0
  • Debian
    ,
    Ubuntu

Start using this module

Documentation

telefonica/github_actions_runner — version 0.4.0 Feb 22nd 2021

PDK Test Unit

GitHub Actions Runner

Automatic configuration for running GitHub Actions on Debian hosts as a service

Table of Contents

  1. Description
  2. Limitations - OS compatibility, etc.
  3. Development - Guide for contributing to the module

Description

This module will setup all of the files and configuration needed for GitHub Actions runner to work on any Debian 9 hosts.

hiera configuration

This module supports configuration through hiera. The following example creates repository level Actions runners.

github_actions_runner::ensure: present
github_actions_runner::base_dir_name: '/data/actions-runner'
github_actions_runner::package_name: 'actions-runner-linux-x64'
github_actions_runner::package_ensure: '2.272.0'
github_actions_runner::repository_url: 'https://github.com/actions/runner/releases/download'
github_actions_runner::org_name: 'github_org'
github_actions_runner::personal_access_token: 'PAT'
github_actions_runner::user: 'root'
github_actions_runner::group: 'root'
github_actions_runner::instances:
  first_instance:
    labels:
      - self-hosted-custom

You can also override some of the keys on the instance level

github_actions_runner::ensure: present
github_actions_runner::base_dir_name: '/data/actions-runner'
github_actions_runner::package_name: 'actions-runner-linux-x64'
github_actions_runner::package_ensure: '2.272.0'
github_actions_runner::repository_url: 'https://github.com/actions/runner/releases/download'
github_actions_runner::org_name: 'github_org'
github_actions_runner::personal_access_token: 'PAT'
github_actions_runner::user: 'root'
github_actions_runner::group: 'root'
github_actions_runner::instances:
  first_instance:
    labels:
      - self-hosted-custom1
  second_instance:
    ensure: absent
  third_instance:
    labels:
      - self-hosted-custom3
    repo_name: myrepo
    org_name: other_org
    personal_access_token: other_secret

In case you need to set proxy in one instance:

github_actions_runner::ensure: present
github_actions_runner::base_dir_name: '/data/actions-runner'
github_actions_runner::package_name: 'actions-runner-linux-x64'
github_actions_runner::package_ensure: '2.272.0'
github_actions_runner::repository_url: 'https://github.com/actions/runner/releases/download'
github_actions_runner::org_name: 'github_org'
github_actions_runner::personal_access_token: 'PAT'
github_actions_runner::user: 'root'
github_actions_runner::group: 'root'
github_actions_runner::instances:
  first_instance:
    http_proxy: http://proxy.local
    https_proxy: http://proxy.local
    no_proxy: example.com
    labels:
      - self-hosted-custom1

In case you are using Github Enterprise Server , you can define these two parameters to specify the correct urls:

github_actions_runner::github_domain: "https://git.example.com"
github_actions_runner::github_api: "https://git.example.com/api/v3"

Limitations

Tested on Debian 9 stretch hosts only. full list of operating systems support and requirements are described in metadata.json file.

If you don't specify repository name , make sure you Personal Access Token is org level admin.

Development

There are a few guidelines that we need contributors to follow so that we can have a chance of keeping on top of things. For more information, see Puppet Forge module contribution guide.

License

GitHub Actions Runner is available under the Apache License, Version 2.0. See LICENSE file for more info.