To allow a single Docker host runner to handle multiple jobs simultaneously, you need to modify the runner configuration to register multiple runner processes on the same host machine. :
Steps to Register Multiple Runner Processes:
Create a New Runner Directory: Each runner instance requires its own directory. To register multiple runners, create separate directories for each one.
mkdir actions-runner-2 cd actions-runner-2
Download and Configure Another Runner: You can download the runner from your GitHub repository or organization.
# Download the latest runner package curl -o actions-runner-linux-x64-2.308.0.tar.gz -L https://github.com/actions/runner/releases/download/v2.308.0/actions-runner-linux-x64-2.308.0.tar.gz # Extract the installer tar xzf ./actions-runner-linux-x64-2.308.0.tar.gz
Register the Runner: Register the second runner using a different name for the same repository or organization.
./config.sh --url https://github.com/<owner>/<repo> --token <registration_token>
You can get the<registration_token>
from your GitHub repository or organization settings under Settings > Actions > Runners.Start the New Runner: Start the new runner so it can handle additional jobs.
./svc.sh install ./svc.sh start
Now, you should have two runners registered on the same machine, which can handle two jobs simultaneously.Repeat for More Runners: If you want to handle more concurrent jobs, repeat the above steps, creating more runner directories (e.g.,
actions-runner-3
, etc.) and registering them.Runners can be created as a background service using these steps.
No comments:
Post a Comment