# L'action `healthchecks-ping` Cette action permet d’envoyer 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 l’interface 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é, **l’action échoue volontairement** (`exit 1`). - Si `curl` échoue, l’action affiche l’erreur et échoue également. - L’URL appelée par `curl` dépend de la commande : - `https:///ping/` *(commande `stop` ou vide)* - `https:///ping//` *(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/)