Merge pull request #9 from maxkratz/feature/add-runner-doc

Adds documentation and a script for the self-hosted runner setup
This commit is contained in:
Maximilian Kratz 2024-05-18 14:43:41 +02:00 committed by GitHub
commit 3e1f5e0695
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 41 additions and 0 deletions

View file

@ -40,3 +40,16 @@ The following packages are installed in this Docker image:
## Issues & Contribution
If you find any problems, bugs or missing packages, feel free to open an [issue on Github](https://github.com/maxkratz/docker_pandoc-builder/issues).
## Runner requirements
Currently, all actions must be run by a self-hosted GitHub runner, because GitHub-hosted runners do not have enough storage available.
### Self-hosted Linux-based runners
In order to run the "GitHub Actions" pipeline on a self-hosted runner, you must ensure that you have at least one properly configured Linux-based runner added to this GitHub project.
Required packages (at least):
- `curl`
- `wget`
- `grep`
- `docker` (including buildx plugin)

28
runner-setup.sh Normal file
View file

@ -0,0 +1,28 @@
#!/bin/bash
set -e
USERNAME=maxkratz
# utilities + sudo
apt-get update
apt-get install -yq sudo tmux htop wget grep sed gpg unzip tar curl
/sbin/adduser $USERNAME sudo
# Docker
# Add Docker's official GPG key:
apt-get update
apt-get install -yq ca-certificates curl
install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
chmod a+r /etc/apt/keyrings/docker.asc
# Add the repository to Apt sources:
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
tee /etc/apt/sources.list.d/docker.list > /dev/null
apt-get update
apt-get install -yq docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
echo "=> Prerequisites installed. Ready for GitHub Actions runner installation."