Skip to content

Execute a self-hosted GitHub Actions Runner in a ephemeral LXD container

Notifications You must be signed in to change notification settings

rgl/lxd-github-actions-runner

Repository files navigation

About

build

Execute a self-hosted GitHub Actions Runner in a ephemeral LXD container.

Usage

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

Reference

About

Execute a self-hosted GitHub Actions Runner in a ephemeral LXD container

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published