Files
healthchecks-ping/README.md

67 lines
2.6 KiB
Markdown
Raw Normal View History

2025-04-14 12:42:52 +02:00
# L'action `healthchecks-ping`
2025-04-14 00:29:54 +02:00
2025-04-14 12:42:52 +02:00
Cette action permet denvoyer un *ping* vers un serveur [Healthchecks.io](https://healthchecks.io) (ou un serveur compatible).
Elle est conçue pour être utilisée dans des workflows Gitea avec des runners auto-hébergés.
2025-04-14 00:29:54 +02:00
2025-04-14 12:42:52 +02:00
---
## 🔧 Utilisation
2025-04-14 00:29:54 +02:00
```yaml
2025-04-14 12:42:52 +02:00
- name: Notify healthchecks
uses: https://gargoton.petite-maison-orange.fr/pmo-actions/healthchecks-ping@main
2025-04-14 00:29:54 +02:00
```
2025-04-14 12:42:52 +02:00
---
## 📥 Paramètres
| Nom | Obligatoire | Par défaut | Description |
|------------------|-------------|------------|-----------------------------------------------------------------------------|
| `check_server` | ✅ | | Adresse du serveur Healthchecks, incluant `https://`. |
| `check_uuid` | ✅ | | Identifiant UUID de la vérification. |
| `check_command` | ❌ | `stop` | Commande : `start`, `log`, `fail`, ou `stop`. |
| `check_message` | ❌ | `""` | Message transmis avec le ping (visible dans linterface Healthchecks). |
| `debug` | ❌ | `false` | Affiche des messages de debug détaillés si activé. |
---
## ▶️ Exemple de workflow
2025-04-14 00:29:54 +02:00
2025-04-14 12:42:52 +02:00
```yaml
- name: Notify healthchecks (start)
uses: https://gargoton.petite-maison-orange.fr/pmo-actions/healthchecks-ping@main
with:
check_server: https://hc-ping.com
check_uuid: a1b2c3d4-1234-5678-9abc-def123456789
check_command: start
- name: Build my project
run: make build
- name: Notify healthchecks (stop)
uses: https://gargoton.petite-maison-orange.fr/pmo-actions/healthchecks-ping@main
with:
check_server: https://hc-ping.com
check_uuid: a1b2c3d4-1234-5678-9abc-def123456789
check_message: "Build terminé avec succès ✅"
```
2025-04-14 00:29:54 +02:00
2025-04-14 12:42:52 +02:00
---
2025-04-14 00:29:54 +02:00
2025-04-14 12:42:52 +02:00
## ⚙️ Comportement
2025-04-14 00:29:54 +02:00
2025-04-14 12:42:52 +02:00
- Si `check_command: fail` est utilisé, **laction échoue volontairement** (`exit 1`).
- Si `curl` échoue, laction affiche lerreur et échoue également.
- LURL appelée par `curl` dépend de la commande :
- `https://<check_server>/ping/<uuid>` *(commande `stop` ou vide)*
- `https://<check_server>/ping/<uuid>/<check_command>` *(commande `start`, `log`, `fail`)*
2025-04-14 00:29:54 +02:00
2025-04-14 12:42:52 +02:00
---
2025-04-14 00:29:54 +02:00
2025-04-14 12:42:52 +02:00
## 🧡 À propos
2025-04-14 00:29:54 +02:00
2025-04-14 12:42:52 +02:00
Cette action fait partie des actions de la **Petite Maison Orange**.
Toutes les actions sont disponibles ici :
👉 [https://gargoton.petite-maison-orange.fr/pmo-actions/](https://gargoton.petite-maison-orange.fr/pmo-actions/)