GitHub Self-Hosted Runner

Customizable, scalable agent facilitating CI/CD processes within your infrastructure, enhancing workflow automation and efficiency. Integrates seamlessly.

GitHub self-hosted runner is a configurable agent for GitHub Actions, allowing you to run workflows on your own infrastructure, offering customization and control over the environment for continuous integration and deployment.

A repository runner in GitHub refers to a dedicated agent that executes workflows within a specific repository. It is configured to run actions defined in that repository, ensuring tailored automation. Conversely, an organizational runner is a versatile agent that can be shared across multiple repositories within a GitHub organization. It allows centralized workflow execution, streamlining CI/CD processes for all repositories within the organization. Both types of runners facilitate workflow automation, enabling efficient software development and deployment while accommodating varying levels of granularity and scalability based on the project's structure and requirements.

STEPS TO SETUP GITHUB SELF HOSTED RUNNER

  1. As per the requirement setup the runner. It can be a Repository Runner or Organizational Runner. - For Repository Runner, Select the respective GitHub Repository. - For Organizational Runner, Select the respective GitHub organization for setting up runner.

  2. Click on Settings >> Actions >> Runners >> New self-hosted runner >> Linux >> Architecture = x64

  1. Run the following commands to setup runner -

mkdir actions-runner && cd actions-runner
curl -o actions-runner-linux-x64-2.309.0.tar.gz -L https://github.com/actions/runner/releases/download/v2.309.0/actions-runner-linux-x64-2.309.0.tar.gz
echo "2974243bab2a282349ac833475d241d5273605d3628f0685bd07fb5530f9bb1a  actions-runner-linux-x64-2.309.0.tar.gz" | shasum -a 256 -c
tar xzf ./actions-runner-linux-x64-2.309.0.tar.gz
export RUNNER_ALLOW_RUNASROOT="1"
./config.sh --url https://github.com/<<  organization_name >>/<< repository_name >> --token << token >>

While running, ./config.sh --url https://github.com/<< organization_name >>/<< repository_name >> --token << token >> command it will ask Runner name & it's label so enter the required name & label.

  1. Now start the runner by using following command -

./svc.sh install
./svc.sh start
./svc.sh status

Below attached is the video for practical reference -

Last updated