Execute a self-hosted GitHub Actions Runner in a ephemeral LXD container.
Build the ghar-debian-11
runner container:
./images/ghar-debian-11/build.sh
Create the lxd-ghar
Personal Access Token (PAT) at
https://github.com/settings/tokens/new for the repo
scope.
Create the configuration file:
cp example-config.yml config.yml
vim config.yml
Build and execute the runner:
go build
export LXD_SOCKET='/var/snap/lxd/common/lxd/unix.socket'
export GITHUB_TOKEN='your-lxd-ghar-pat'
./lxd-github-actions-runner -config config.yml
Install and start the lxd-ghar
service:
sudo --preserve-env=GITHUB_TOKEN ./install.sh
Later you can uninstall with:
sudo ./uninstall.sh