diff --git a/templates/gitea-runner/README.md b/templates/gitea-runner/README.md index f9fee80..68ba309 100644 --- a/templates/gitea-runner/README.md +++ b/templates/gitea-runner/README.md @@ -1,8 +1,25 @@ -# gitea-runner (templates) +# Gitea Actions Runner (Portainer template) -### Description -Description for gitea-runner goes here. +Gitea Actions Runner (act_runner) is a runner for Gitea Actions. It is compatible with GitHub Actions and allows you to run CI/CD workflows within your Gitea instance. -### Configuration -- Path: templates/gitea-runner/docker-compose.yml -- Status: Draft +Quick notes: + +- **Registration**: You will need a registration token from your Gitea instance (Site Administration > Actions > Runners). +- **Docker-in-Docker**: To run container-based actions, the runner requires access to the Docker socket (`/var/run/docker.sock`). +- **Persistence**: Ensure the data volume is mapped to persist the runner configuration and registration state. + +Usage: + +1. Import the compose file into Portainer's Stacks or App Templates. +2. Configure the `GITEA_INSTANCE_URL` and `GITEA_RUNNER_REGISTRATION_TOKEN` environment variables. +3. Ensure the volume mapping for `/var/run/docker.sock` is correctly set if you plan to use Docker-based workflows. +4. Deploy the stack via Portainer. +5. Verify the runner appears as "Online" in your Gitea settings. + +Helpful links: + +- Gitea Actions Documentation: https://docs.gitea.com/usage/actions/overview +- Runner Repository: https://gitea.com/gitea/act_runner +- Docker Hub: https://hub.docker.com/r/gitea/act_runner + +**Status:** Ready for configuration diff --git a/templates/gitea-runner/docker-compose.yml b/templates/gitea-runner/docker-compose.yml index e69de29..b52fc66 100644 --- a/templates/gitea-runner/docker-compose.yml +++ b/templates/gitea-runner/docker-compose.yml @@ -0,0 +1,15 @@ + + +services: + act_runner: + image: docker.io/gitea/act_runner:latest + container_name: gitea_runner + restart: unless-stopped + environment: + - GITEA_INSTANCE_URL=YPOUR_GITEA_INSTANCE_URL_HERE + - GITEA_RUNNER_REGISTRATION_TOKEN=YOUR_RUNNER_REGISTRATION_TOKEN_HERE + - GITEA_RUNNER_NAME=solo-runner + - GITEA_RUNNER_LABELS=ubuntu-latest:docker://catthehacker/ubuntu:act-latest + volumes: + - /volume1/docker/gitea-runner:/data + - /var/run/docker.sock:/var/run/docker.sock # This allows the runner to start containers \ No newline at end of file