Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Start by navigating to your GitHub Organization (for organization-level runners) or Repository (for repository-level runners) and select Settings,then select Actions → Runners from the menu on the left-hand side.

  2. On the page displayed click New self-hosted runner.

  3. For the Runner image select Windows (as you’ll be installing this runner on a MettleCI Agent Host). The Architecture will be automatically set to x64.

  4. Follow the prompts on the screen to paste the supplied scripts into a PowerShell window on your MettleCI Agent Host. This script will …

a. Create a C:\actions-runner directory

b. Download a Runner for GitHub Actions from GitHub and unzip it.

Info

If you experience difficulties in downloading the runner archive, you may need to allow TLS 1.2:

Code Block
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;

c. Run a configuration script (config.cmd)

  1. Start the runner (which you should configure to run as a Windows Service) with run.cmd.

Here's an example dump from an GitHub self-hosted runner installation session…which …

a. installs the runner in the default runner group

b. adds the MettleCI and DataStage11.7 tags to your runner

c. installs the runner as a Windows Service executing under account NT AUTHORITY\NETWORK SERVICE

Code Block
languagepowershell
PS C:\actions-runner> ./config.cmd --url https://github.com/johnmckeever/github.mettleci.io --token XXXX_YOUR_TOKEN_XXXX
--------------------------------------------------------------------------------
|        ____ _ _   _   _       _          _        _   _                      |
|       / ___(_) |_| | | |_   _| |__      / \   ___| |_(_) ___  _ __  ___      |
|      | |  _| | __| |_| | | | | '_ \    / _ \ / __| __| |/ _ \| '_ \/ __|     |
|      | |_| | | |_|  _  | |_| | |_) |  / ___ \ (__| |_| | (_) | | | \__ \     |
|       \____|_|\__|_| |_|\__,_|_.__/  /_/   \_\___|\__|_|\___/|_| |_|___/     |
|                                                                              |
|                       Self-hosted runner registration                        |
|                                                                              |
--------------------------------------------------------------------------------
# Authentication
√ Connected to GitHub

# Runner Registration
Enter the name of the runner group to add this runner to: [press Enter for Default] <ENTER>
Enter the name of runner: [press Enter for DEMO115-CLNT] <ENTER>
This runner will have the following labels: 'self-hosted', 'Windows', 'X64'
Enter any additional labels (ex. label-1,label-2): [press Enter to skip] MettleCI,DataStage11.7 <ENTER>

√ Runner successfully added
√ Runner connection is good

# Runner settings
Enter name of work folder: [press Enter for _work] <ENTER>

√ Settings Saved.
Would you like to run the runner as service? (Y/N) [press Enter for N] Y <ENTER>
User account to use for the service [press Enter for NT AUTHORITY\NETWORK SERVICE] <ENTER>
Granting file permissions to 'NT AUTHORITY\NETWORK SERVICE'.
Service actions.runner.johnmckeever-github.mettleci.io.DEMO117-CLNT successfully installed
Service actions.runner.johnmckeever-github.mettleci.io.DEMO117-CLNT successfully set recovery option
Service actions.runner.johnmckeever-github.mettleci.io.DEMO117-CLNT successfully set to delayed auto start
Service actions.runner.johnmckeever-github.mettleci.io.DEMO117-CLNT successfully configured
Waiting for service to start...
Service actions.runner.johnmckeever-github.mettleci.io.DEMO117-CLNT started successfully

PS C:\actions-runner>

...