Build a docker image and tag it
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-08-30 17:54:28 +02:00
action.yaml feat: extend composite action workflow with cache and library steps 2026-08-30 17:53:51 +02:00
README.md Actualiser README.md 2025-04-14 12:53:45 +02:00

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

- 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

- 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/