Synthèse automatique
Exécute localement des workflows GitHub Actions dans des conteneurs Docker avec act, afin de tester et déboguer la CI sans pousser de commits.
Points forts
- Couvre l'installation, le choix des images de runner, les secrets, les variables et les options de débogage.
- Donne des commandes concrètes pour lister les jobs, cibler un événement ou un job et filtrer une matrice.
- Explique des contournements propres à act, comme ACT=true et les fichiers d'événement, pour adapter les workflows.
- Signale les pièges non interactifs et propose un fichier .actrc de projet pour éviter les invites bloquantes.
Limites
- Dépend de Docker Engine et ne prend pas en charge podman.
- L'image medium est incomplète par rapport au runner GitHub, tandis que l'image full est très volumineuse.
- L'environnement local ne reproduit pas parfaitement le runner hébergé, et les conditions au niveau du job nécessitent des adaptations.
Utilisez cette compétence pour reproduire rapidement un job CI en échec ou valider une modification de workflow avant de pousser.
Ne l'utilisez pas si Docker n'est pas disponible ou si vous avez besoin d'une parité exacte avec les runners hébergés par GitHub.
Analyse de sécurité
PrudenceThe skill is documentation-style guidance for a real, legitimate tool (nektos/act) and contains no hidden payloads, curl|sh pipelines, or secret-exfiltration behavior. However, its core function is to execute arbitrary workflow-supplied code, it documents a host-execution mode (`-self-hosted`), and it handles credential files and environment-sourced secrets, so it warrants a caution rating rather than safe.
- •Running GitHub Actions workflows locally executes arbitrary shell code from repository workflow files inside Docker containers, so any workflow in a cloned/untrusted repo runs code on the user's machine (with container-level access to the workspace and any mounted paths).
- •The guideline `-P ubuntu-latest=-self-hosted` explicitly causes jobs to run directly on the host rather than in a container; combined with untrusted workflows this is effectively host-level code execution, and it is presented with only a brief caveat.
- •The skill directs users to feed credential material into runs (`--secret-file .secrets`, `-s NPM_TOKEN` read from the shell environment, `--var-file`, `--env-file`) and to write these into project files; while it advises throwaway values and .gitignore, a user following it casually could expose real tokens to containerized code or commit them.
- •It relies on pulling third-party Docker images (catthehacker/ubuntu) and GitHub Actions at runtime from the network, an inherent supply-chain dependency not pinned by digest.
- •No obfuscation, exfiltration, or prompt-injection attempts were found; all commands are transparent and documented.
- •Uses Docker and pulls third-party runner images by default, creating a supply-chain and host-resource exposure surface.
- •Handles secrets via --secret-file, environment variables, and GITHUB_TOKEN; guidance recommends throwaway values but users could pass real credentials.
- •Mentions -P ubuntu-latest=-self-hosted, which runs workflow jobs directly on the host; it is warned about but remains a high-impact option.
- •Includes package installation commands from multiple package managers and GitHub releases; checksum verification is suggested but optional.
Exemples
My GitHub Actions test job fails on CI and I can't see why. Create a project .actrc using catthehacker/ubuntu:act-latest and run only the test job locally with my .secrets file and verbose logs.Run the pull_request workflow locally with act, pass the target input through an event payload, and load environment values from my .env file.Before I push, use act to dry-run and validate .github/workflows/ci.yml, then show me the job graph and any schema errors.name: act description: >- Runs GitHub Actions workflows on your own machine in Docker containers with act, so CI can be tested without pushing. Use when a user asks to test GitHub Actions workflows locally, debug a failing CI pipeline, pass secrets or inputs to a local run, or run workflows offline. license: Apache-2.0 compatibility: 'Docker Engine required (podman is not supported); Linux, macOS, Windows' metadata: author: terminal-skills version: "1.2.0" category: development tags: "act, github-actions, ci, local, docker" repository: https://github.com/nektos/act
Act
Overview
act reads .github/workflows/, pulls or builds the images the jobs need, and runs each job in a Docker container with the environment variables and filesystem layout GitHub uses. It is a fast feedback loop for workflow edits and a way to use workflows as a local task runner. Current release is v0.2.89 (June 2026). Docs: https://nektosact.com.
Instructions
Step 1: Install
Use a package manager: brew install act (macOS, Linux), winget install nektos.act or choco install act-cli (Windows), pacman -Syu act (Arch), nix-shell -p act, or the GitHub CLI extension gh extension install https://github.com/nektos/gh-act. Alternatively download the archive for your platform from the GitHub releases page and verify it against checksums.txt from the same release (sha256sum -c) before unpacking. Docker Engine must be running.
Step 2: Pick runner images
The first run without configuration asks you to choose an image size and saves the choice to ~/.config/act/actrc. Skip the prompt, which also hangs in non-interactive shells, by putting the mapping in a project .actrc (one flag per line):
-P ubuntu-latest=catthehacker/ubuntu:act-latest
--env-file .env
--action-offline-mode
act-latest is the "medium" image; it lacks many tools of the real GitHub runner. catthehacker/ubuntu:full-latest is closer but is about 17 GB to download (the prompt itself warns of 75 GB of free disk). On Apple Silicon add --container-architecture linux/amd64.
Step 3: Run
act -l # list jobs and their events
act # run the "on: push" workflows
act pull_request # run a specific event
act -j test # one job (its `needs` jobs run too)
act -W .github/workflows/ci.yml # one workflow file
act workflow_dispatch --input target=production
act push --matrix node:22 # only matrix entries that include node 22
act -e event.json # custom event payload
Step 4: Secrets, variables, local-only behavior
act --secret-file .secrets # KEY=value lines; default file is .secrets
act -s NPM_TOKEN # take the value from your shell environment
act --var-file .vars # values for ${{ vars.NAME }}
act --env-file .env # plain environment variables
act sets ACT=true, so a step can skip itself locally with if: ${{ !env.ACT }}. Job-level if: cannot see env; use an event file such as {"act": true} with act -e event.json and test !github.event.act.
Step 5: Debug
act -n # dry run: validates and prints the plan without creating containers
act --validate # check workflow schema
act -g # draw the job graph
act -v # verbose logs
act -r # keep the container after success to inspect state between runs
act --artifact-server-path .artifacts # enable upload-artifact/download-artifact
Examples
Example 1: Reproduce a failing CI job before pushing
User request: "My test job fails on GitHub but I cannot see why. Run it locally."
printf -- '-P ubuntu-latest=catthehacker/ubuntu:act-latest\n' > .actrc
act -j test --secret-file .secrets -v
Result: act pulls the image on the first run, then streams each step as [CI/test] | ..., ending with Job failed and the failing step's output, so the fix can be tried and rerun in seconds.
Example 2: Run a deploy workflow with inputs and without side effects
User request: "Dry-run the deploy workflow for production but do not post to Slack"
Workflow step: - if: ${{ !env.ACT }} on the Slack notification.
printf 'AWS_REGION=eu-west-1\n' > .vars
printf 'NPM_TOKEN=npm_localdummy\n' > .secrets
act workflow_dispatch --input target=production
Result: The job log shows target=production and region=eu-west-1, the Slack step is skipped, and the run ends with Job succeeded.
Guidelines
- Add
.secrets,.varsand.envto.gitignore; use throwaway values locally, never production credentials. - Not everything works: OIDC tokens, GitHub-hosted service features,
systemd, many preinstalled tools and cross-run artifact downloads are missing or differ. A green local run is not proof for GitHub. - Podman and other container engines are not supported;
--pullis on by default, so images are fetched each run; add--pull=falseor--action-offline-modeonce images are cached. - First pulls are large (the medium image is about 500 MB, the large one about 17 GB, the micro one under 200 MB but incompatible with many actions).
- Use
-P ubuntu-latest=-self-hostedonly when you accept jobs running directly on your host. - Actions fetched by act may need a token to avoid GitHub rate limits; pass it with
-s GITHUB_TOKEN. - Delete leftover containers with
docker rmafter-rruns.
Du fichier au premier essai
Le téléchargement contient exactement le contenu affiché sur cette fiche. Cette copie peut différer de la dernière version du dépôt source.
Consulter la source et ses fichiers annexesCe téléchargement contient uniquement SKILL.md. Les scripts, références, modèles et dépendances éventuels ne sont pas inclus. Récupérez les fichiers nécessaires depuis la source en conservant leur arborescence avant de poursuivre.
1. Télécharger le fichier
Télécharger SKILL.mdDepuis la racine d’un projet de test, enregistrez le fichier sous .skill-downloads/test-github-actions-locally-with-act-mwirmduu/SKILL.md, ou utilisez la commande suivante. Ce dossier sert à examiner la skill avant son installation.
Commande pour macOS/Linux ou WSL : un shell POSIX et curl sont nécessaires. Sous Windows sans WSL, utilisez le bouton de téléchargement et créez le dossier manuellement.
mkdir -p '.skill-downloads/test-github-actions-locally-with-act-mwirmduu' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/test-github-actions-locally-with-act-mwirmduu/download' --output '.skill-downloads/test-github-actions-locally-with-act-mwirmduu/SKILL.md.part' && mv '.skill-downloads/test-github-actions-locally-with-act-mwirmduu/SKILL.md.part' '.skill-downloads/test-github-actions-locally-with-act-mwirmduu/SKILL.md'2. Vérifier les prérequis
Lisez SKILL.md avant de l’utiliser. Si le fichier cite des scripts ou services externes, examinez-les et préparez les accès nécessaires dans votre environnement de test.
Environnement déclaré par l’auteur : Docker Engine required (podman is not supported); Linux, macOS, Windows
Aucune section de prérequis reconnue dans ce fichier. Cela ne signifie pas qu’il est autonome : les bibliothèques, outils et accès peuvent être cités ailleurs dans le contenu ou dans le dépôt source.
Les plateformes de la fiche sont des indications du catalogue. Les chemins ci-dessous suivent la documentation des outils ; ils ne prouvent pas que cette skill y a été exécutée. Aucune version minimale de ces outils n’est attestée pour cette fiche.
3. Charger la skill
Après vérification, copiez le dossier complet dans le projet avec l’une des commandes ci-dessous, puis ouvrez une nouvelle session de l’outil. La commande s’arrête si un dossier du même nom existe déjà : comparez les fichiers avant de le remplacer.
Claude Code
test -f '.skill-downloads/test-github-actions-locally-with-act-mwirmduu/SKILL.md' && test -s '.skill-downloads/test-github-actions-locally-with-act-mwirmduu/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/act' && cp -R '.skill-downloads/test-github-actions-locally-with-act-mwirmduu' '.claude/skills/act'Cursor
test -f '.skill-downloads/test-github-actions-locally-with-act-mwirmduu/SKILL.md' && test -s '.skill-downloads/test-github-actions-locally-with-act-mwirmduu/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/act' && cp -R '.skill-downloads/test-github-actions-locally-with-act-mwirmduu' '.cursor/skills/act'Codex
test -f '.skill-downloads/test-github-actions-locally-with-act-mwirmduu/SKILL.md' && test -s '.skill-downloads/test-github-actions-locally-with-act-mwirmduu/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/act' && cp -R '.skill-downloads/test-github-actions-locally-with-act-mwirmduu' '.agents/skills/act'OpenSkills
OpenSkills doit déjà être installé. La procédure locale install/read est contrôlée avec OpenSkills 1.5.0, qui exige Node.js ≥ 20.6.0. Aucun slug du catalogue n’est résolu automatiquement.
Installation officielle d’OpenSkillsopenskills install './.skill-downloads/test-github-actions-locally-with-act-mwirmduu'openskills read 'test-github-actions-locally-with-act-mwirmduu'La lecture doit afficher le contenu du fichier installé et son dossier de base. Elle ne lance ni la skill ni ses dépendances.
Pour un agent qui lit AGENTS.md, synchronisez ensuite l’index. Cette commande modifie AGENTS.md : relisez le diff avant de l’utiliser.
openskills syncMode manuel ou autre outil : joignez SKILL.md à une conversation, ou ouvrez-le dans un agent capable de lire les fichiers. Ajoutez les ressources annexes nécessaires. Il n’existe pas de dossier universel reconnu par tous les outils.
4. Faire un premier essai
Utilisez une entrée courte et fictive : un endpoint d’API, un petit document ou un brief d’interface. Dans une nouvelle conversation, joignez le fichier ou donnez son chemin à l’agent, puis adaptez cette demande :
Lis .skill-downloads/test-github-actions-locally-with-act-mwirmduu/SKILL.md et applique ses instructions à cet exemple : [décrire une entrée de test]. Indique les fichiers, dépendances ou accès qui manquent. Produis le résultat demandé par la skill sans inventer de données ni exécuter de script non examiné.Résultat attendu : une sortie correspondant aux instructions de la skill, ou une liste précise des prérequis manquants. Une simple confirmation de lecture ne valide pas le premier usage. Si une ressource externe est indisponible, ce parcours reste à tester.
Configurer un canal de discussion avec SecretRefs
DevOps
Configurez des canaux de discussion avec des commandes non interactives, les secrets étant uniquement des SecretRefs. Couvre les étapes de collecte, modification, réparation et vérification.
Enquêter sur les échecs CI de ClickHouse
DevOps
Investigue un échec CI de ClickHouse de bout en bout à partir d'une URL de PR ou de rapport S3. Récupère les tests échoués, classe flaky vs vraie régression, et cherche des issues/fixes existants.
Revue de PR Ansible
DevOps
Examine une PR Ansible selon le processus standardisé du projet, incluant la validation des changelogs, la couverture de tests et le suivi des commentaires.