forgejo
This is an old revision of the document!
This page describes the process for configuring automatic pulls when a push is made to a repository on ForgeJo. Uses forgejorunner and a script in .forgejo/workflows in the repository files.
Optional: Create a new user with a homefolder so the runner doesn't use the same SSH user as you.
Set up Forgerunner:
- make a new directory and create a compose.yml file with the following:
services: forgejo-runner: hostname: forgerunner image: code.forgejo.org/forgejo/runner:5.0.4 container_name: forgejorunner environment: DOCKER_HOST: unix:///var/run/podman/podman.sock user: 0:0 #Gives permission errors if not root. Can this be fixed somehow? volumes: - ./data:/data - /var/run/podman/podman.sock:/var/run/podman/podman.sock restart: unless-stopped command: forgejo-runner -c /data/config.yaml daemon
- save it and create a new folder in the same directory called “data”
mkdir forgerunner cd forgerunner mkdir data touch compose.yml echo "services: forgejo-runner: hostname: forgerunner image: code.forgejo.org/forgejo/runner:5.0.4 container_name: forgejorunner environment: DOCKER_HOST: unix:///var/run/podman/podman.sock user: 0:0 #Gives permission errors if not root. Can this be fixed somehow? volumes: - ./data:/data - /var/run/podman/podman.sock:/var/run/podman/podman.sock restart: unless-stopped command: forgejo-runner -c /data/config.yaml daemon" > compose.yml sudo podman-compose run --rm forgejo-runner 'forgejo-runner' 'generate-config' > data/config.yaml sudo podman-compose up -d sudo podman-compose run --rm forgejo-runner 'forgejo-runner' 'register'
- STOP and verify that something hasn't gone wrong at this step. Check the new config.yaml that was generated. - Follow the prompts. Enter your forgejo url and runner token from YourRepo → Settings → Actions → Runners → Create new runner
forgejo.1743147434.txt.gz · Last modified: by ryan