# L'action `build-image` Cette action permet de créer une image Docker et de la taguer avec les outils `docker` ou `podman`. Elle est conçue pour être utilisée dans des workflows Gitea avec des runners auto-hébergés. --- ## 🔧 Utilisation ```yaml - name: Build and tag Docker image uses: https://gargoton.petite-maison-orange.fr/pmo-actions/build-image@main with: image_name: my_image image_tags: latest stable ``` --- ## 📥 Paramètres | Nom | Obligatoire | Par défaut | Description | |------------------|-------------|-------------------------------------|---------------------------------------------------------------------------------| | `image_name` | ✅ | – | Nom de l'image à construire. | | `image_tags` | ✅ | – | Liste des tags à ajouter à l'image. | | `registry_server`| ❌ | `niepce.petite-maison-orange.fr` | Adresse du serveur d'enregistrement des images Docker. | | `build_command` | ❌ | `docker` | Commande à utiliser pour construire l'image (`docker` ou `podman`). | | `tag_command` | ❌ | `podman` | Commande à utiliser pour taguer l'image (`docker` ou `podman`). | | `debug` | ❌ | `false` | Mode débogage. Si activé, affiche des informations détaillées pendant l'exécution. | --- ## ▶️ Exemple de workflow ```yaml - name: Build Docker image uses: https://gargoton.petite-maison-orange.fr/pmo-actions/build-image@main with: image_name: my_image image_tags: latest stable - name: Notify Healthchecks 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 ``` --- ## ⚙️ Comportement - Si la commande `build_command` échoue, l'action renvoie une erreur. - Si la commande `tag_command` échoue, l'action renvoie une erreur. - Si les commandes `build_command` et `tag_command` diffèrent, l'image est transférée du format de la commande `build_command` vers celui de `tag_command`. --- ## 🧡 À 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/)