Files
install-container-tools/README.md
2025-12-26 15:07:28 +01:00

113 lines
3.0 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 `install-container-tools`
Cette action installe les outils de conteneurisation (Docker, Podman, Skopeo) sur le runner.
---
## 🔧 Utilisation
```yaml
- 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
```yaml
- name: Install Skopeo
uses: https://gargoton.petite-maison-orange.fr/pmo-actions/install-container-tools@main
with:
tools: skopeo
```
### Installer Podman uniquement
```yaml
- name: Install Podman
uses: https://gargoton.petite-maison-orange.fr/pmo-actions/install-container-tools@main
with:
tools: podman
```
### Installer plusieurs outils
```yaml
- 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é
```yaml
- 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)
```yaml
- 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)
```yaml
- 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/](https://gargoton.petite-maison-orange.fr/pmo-actions/)