ci(runner): read env from C:\Users\Nicolas Cantu/4nk_template/.env; update README accordingly

This commit is contained in:
Nicolas Cantu 2025-08-28 00:41:35 +02:00
parent 8713c7f971
commit 270ad3488c
2 changed files with 17 additions and 7 deletions

View File

@ -9,11 +9,21 @@ Ce dossier contient une configuration prête à l'emploi pour exécuter un runne
## Configuration
1. Créez un fichier `.env` depuis lexemple:
- `INSTANCE_URL`: ex. `https://git.4nkweb.com`
- `REGISTRATION_TOKEN`: token d'enregistrement
- (optionnel) `RUNNER_NAME`, `RUNNER_LABELS` (par défaut `self-hosted,linux`)
2. Le montage du docker.sock est déjà configuré pour exécuter les jobs en conteneurs.
- 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

View File

@ -4,7 +4,8 @@ services:
image: docker.io/gitea/act_runner:nightly
container_name: gitea-act-runner
restart: unless-stopped
env_file: .env
env_file:
- ${HOME}/4nk_template/.env
environment:
- GITEA_RUNNER_LABELS=${RUNNER_LABELS:-self-hosted,linux}
- GITEA_RUNNER_NAME=${RUNNER_NAME:-local-runner}
@ -15,4 +16,3 @@ services:
volumes:
- ./data:/data
- /var/run/docker.sock:/var/run/docker.sock