Files
push-image/README.md
2025-04-14 13:02:19 +02:00

67 lines
2.6 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.
# L'action `healthchecks-ping`
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.
---
## 🔧 Utilisation
```yaml
- name: Notify healthchecks
uses: https://gargoton.petite-maison-orange.fr/pmo-actions/healthchecks-ping@main
```
---
## 📥 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
```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 ✅"
```
---
## ⚙️ Comportement
- 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`)*
---
## 🧡 À propos
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/)