Skip to content

mms-gianni/git-runner

Repository files navigation

git-runner

Manage your github runner with your git cli

GitHub go.mod Go version GitHub top language GitHub Workflow Status GitHub MIT license Swiss made

Why

  • use your local workstation as a runner
  • simplify runner startup
  • simplify runner maintenance
  • cli to automate runner management

Screenshot

Installation

Generate a token here : https://github.com/settings/tokens (You need to be loged in)

To export the Github username and organisation is optional.

Mac

echo 'export GITHUB_TOKEN="XXXXXXXXXXXXXXXXXXXXXXX"' >> ~/.zshrc
echo 'export GITHUB_USERNAME="change-me-to-your-username"' >> ~/.zshrc
echo 'export GITHUB_ORGANISATIONS="klustair,kubernetes"' >> ~/.zshrc
curl https://raw.githubusercontent.com/mms-gianni/git-runner/master/cmd/git-runner/git-runner.mac.64bit -o /usr/local/bin/git-runner
chmod +x /usr/local/bin/git-runner

Linux

echo 'export GITHUB_TOKEN="XXXXXXXXXXXXXXXXXXXXXXX"' >> ~/.bashrc
echo 'export GITHUB_USERNAME="change-me-to-your-username"' >> ~/.bashrc
echo 'export GITHUB_ORGANISATIONS="klustair,kubernetes"' >> ~/.bashrc
curl https://raw.githubusercontent.com/mms-gianni/git-runner/master/cmd/git-runner/git-runner.linux.64bit -o /usr/local/bin/git-runner
chmod +x /usr/local/bin/git-runner

Windows

Windows is not implemented yet. But I'm working on it. Pullrequests wellcome.

Docker

cd git-runner
echo 'export GITHUB_TOKEN="XXXXXXXXXXXXXXXXXXXXXXX"' >> .env
echo 'export GITHUB_USERNAME="change-me-to-your-username"' >> .env
echo 'export GITHUB_ORGANISATIONS="klustair,kubernetes"' >> .env
docker-compose up -d

Quick start

Show status of runners

Display all runners attached to this repository.

cd /path/to/your/repo
git runner status

Remove dead runners

cd /path/to/your/repo
git project clean 

Start a new runner

cd /path/to/your/repo
git project run