configs/forgejo/runner
sneakers-the-rat 87f7e3418c
All checks were successful
/ test (push) Successful in 15s
/ test2 (push) Successful in 2s
some documentation
2024-06-29 02:19:38 -07:00
..
config.yaml pages volume 2024-06-29 01:52:31 -07:00
docker-compose.yaml pages volume 2024-06-29 01:52:31 -07:00
readme.md some documentation 2024-06-29 02:19:38 -07:00

Forgejo runner

https://forgejo.org/docs/next/admin/actions/

Prep

Make user: forgejo-runner

Make data directory within /home/forgejo-runner

set -e

mkdir -p data
touch data/.runner
mkdir -p data/.cache

chown -R 1001:1001 data/.runner
chown -R 1001:1001 data/.cache
chmod 775 data/.runner
chmod 775 data/.cache
chmod g+s data/.runner
chmod g+s data/.cache

Config

.runner

After registering the runner, use one of these images: https://github.com/catthehacker/docker_images/pkgs/container/ubuntu

eg, in .runner:

{
  
  "id": 1,
  "uuid": "d772eb34-e677-4cfe-81a2-f0adcf038375",
  "name": "jonny-runner",
  "token": "...",
  "address": "https://git.jon-e.net",
  "labels": [
    "docker:docker://node:16-bullseye",
    "ubuntu-latest:docker://ghcr.io/catthehacker/ubuntu:act-latest"
  ]
}

config.yaml

Use the one in this repo lol, symlink it into /home/forgejo-runner

Getting pages working

  • Make an nginx static directory site as one usually does, say from some directory /var/www/pages

  • Map that directory into the top-level docker-compose image

  • Edit config.yaml to allow for volume mappings

  • Add the volume mapping to the default docker container arguments (see config.yaml)

  • Blammo run a page build like normal and copy your result into that mapped directory.

See https://git.jon-e.net/jonny/test-pages/ for an example