This script manages GitHub Actions self-hosted runners using Docker.
Before running the script, you need to set up a Python virtual environment and install the required dependencies.
git clone https://github.com/singnet/das-toolbox.git
cd das-toolbox
python3 -m venv venv
Activate the Virtual Environment:
- Linux/macOS:
source venv/bin/activate
cd das-runner-manager
pip install -r src/requirements.txt
Starts the specified number of runners for a given repository. If the GitHub token is not provided, the script will prompt for it interactively.
python3 src/main.py start --repository das --runners 5
--repository das
→ Specifies the repository name.--runners 5
→ Defines the number of runners to start.- The script will ask for your GitHub personal token if not provided.
Lists all the runners that have been started for a specific repository.
python3 src/main.py list --repository das
--repository das
→ Specifies the repository name.
Stops all active runners for a given repository.
python3 src/main.py stop --repository das
--repository das
→ Specifies the repository whose runners should be stopped.
To generate the binary, navigate to the das-runner-manager
directory and run:
make build
- This will require Docker to be installed, as it uses a Docker image to generate the build.
- After running the build, a new directory called
dist
will be created within thedas-runner-manager
directory, containing the binary.