ci(runner): read env from C:\Users\Nicolas Cantu/4nk_template/.env; update README accordingly
This commit is contained in:
parent
8713c7f971
commit
270ad3488c
@ -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 l’exemple:
|
- 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/` n’est 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
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user