Act - Test local des workflows¶
Pourquoi ?¶
Sans act :
commit "fix pipeline" → push → échec
commit "fix pipeline v2" → push → échec
commit "fix pipeline v3" → push → succès
Avec act :
→ 1 seul commit propreact exécute les GitHub/Gitea Actions localement dans Docker, sans pousser vers le serveur.
Installation¶
curl -sL https://github.com/nektos/act/releases/latest/download/act_Linux_x86_64.tar.gz | tar xz act
sudo mv act /usr/local/bin/
Utilisation¶
cd /chemin/vers/mon-repo
# Lister les workflows disponibles
act -l
# Exécuter le workflow par défaut (push)
act
# Exécuter un workflow spécifique
act -W .gitea/workflows/build.yml
# Exécuter un job spécifique
act -j build
Différence avec act_runner¶
| Outil | Quand l'utiliser |
|---|---|
act |
Développement, debug, test avant push |
act_runner |
Exécution automatique après push (serveur) |