2025-12-26 15:07:28 +01:00
2025-12-26 15:06:31 +01:00
2025-12-26 15:07:28 +01:00

L'action install-container-tools

Cette action installe les outils de conteneurisation (Docker, Podman, Skopeo) sur le runner.


🔧 Utilisation

- name: Install container tools
  uses: https://gargoton.petite-maison-orange.fr/pmo-actions/install-container-tools@main
  with:
    tools: skopeo,podman

📥 Paramètres

Nom Obligatoire Par défaut Description
tools Liste d'outils séparés par des virgules (docker,podman,skopeo)
debug false Mode débogage

▶️ Exemples

Installer Skopeo uniquement

- name: Install Skopeo
  uses: https://gargoton.petite-maison-orange.fr/pmo-actions/install-container-tools@main
  with:
    tools: skopeo

Installer Podman uniquement

- name: Install Podman
  uses: https://gargoton.petite-maison-orange.fr/pmo-actions/install-container-tools@main
  with:
    tools: podman

Installer plusieurs outils

- name: Install multiple tools
  uses: https://gargoton.petite-maison-orange.fr/pmo-actions/install-container-tools@main
  with:
    tools: docker,podman,skopeo

Avec debug activé

- name: Install tools with debug
  uses: https://gargoton.petite-maison-orange.fr/pmo-actions/install-container-tools@main
  with:
    tools: skopeo,podman
    debug: true

⚙️ Comportement

  • Vérifie si l'outil est déjà installé avant de l'installer
  • Support de plusieurs outils en une seule action
  • Installation via apt-get pour Podman et Skopeo
  • Installation via le script officiel pour Docker
  • Gestion d'erreur si un outil n'est pas supporté

🔄 Migration depuis les actions existantes

Avant (dans push-image)

    - name: install skopeo
      if: inputs.push_command == 'skopeo' 
      shell: bash
      run: |
        source "${{ github.action_path }}/../bashlib.sh"
        step "Install software" "skopeo"
        # ... 15 lignes de code ...

    - name: install podman
      if: inputs.push_command == 'podman' 
      shell: bash
      run: |
        source "${{ github.action_path }}/../bashlib.sh"
        step "Install software" "podman"
        # ... 15 lignes de code ...

Après (avec install-container-tools)

    - name: Install container tool
      if: inputs.push_command == 'skopeo' || inputs.push_command == 'podman'
      uses: https://gargoton.petite-maison-orange.fr/pmo-actions/install-container-tools@main
      with:
        tools: ${{ inputs.push_command }}
        debug: ${{ inputs.debug }}

Réduction : ~30 lignes → ~5 lignes par action ! 🎉


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

Description
No description provided
Readme 26 KiB