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 fc1dcf1598
commit 69be4a2a93
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 ## Configuration
1. Créez un fichier `.env` depuis lexemple: - Le runner lit un fichier .env GLOBAL: `$HOME/4nk_template/.env` (commun à tous les dépôts)
- `INSTANCE_URL`: ex. `https://git.4nkweb.com` - Variables attendues dans ce fichier:
- `REGISTRATION_TOKEN`: token d'enregistrement - `INSTANCE_URL` (ex: `https://git.4nkweb.com`)
- (optionnel) `RUNNER_NAME`, `RUNNER_LABELS` (par défaut `self-hosted,linux`) - `REGISTRATION_TOKEN` (token d'enregistrement)
2. Le montage du docker.sock est déjà configuré pour exécuter les jobs en conteneurs. - `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 ## Démarrage

View File

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