4NK_template/runner/README.md

50 lines
1.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Runner Gitea (act_runner)
Ce dossier contient une configuration prête à l'emploi pour exécuter un runner Gitea via Docker Compose.
## Prérequis
- Hôte Linux avec Docker et Docker Compose
- URL de l'instance Gitea et un token d'enregistrement (repo/org/instance)
## Configuration
- Le runner lit un fichier .env GLOBAL: `$HOME/4nk_template/.env` (commun à tous les dépôts)
- Variables attendues dans ce fichier:
- `INSTANCE_URL` (ex: `https://git.4nkweb.com`)
- `REGISTRATION_TOKEN` (token d'enregistrement)
- `RUNNER_NAME` (optionnel)
- `RUNNER_LABELS` (optionnel, défaut: `self-hosted,linux`)
- Aucun `.env` local dans `runner/` nest nécessaire.
Exemple de contenu minimal:
```dotenv
INSTANCE_URL=https://git.4nkweb.com
REGISTRATION_TOKEN=...
RUNNER_NAME=$(hostname)-runner
RUNNER_LABELS=self-hosted,linux
```
## Démarrage
```bash
cd runner
docker compose up -d
```
Le runner s'enregistre automatiquement et apparaît dans Settings → Actions → Runners.
## Arrêt / Mise à jour
```bash
docker compose down
# Mise à jour d'image
docker compose pull && docker compose up -d
```
## Mode éphémère (optionnel)
Activez `GITEA_RUNNER_EPHEMERAL=1` dans `docker-compose.yml` pour des runners jetables.
Réf: Gitea Act Runner — https://docs.gitea.com/usage/actions/act-runner