nektos / act

Run your GitHub Actions locally 🚀
https://nektosact.com
MIT License
51.87k stars 1.3k forks source link

Access workflow contianer #2369

Open latot opened 1 week ago

latot commented 1 week ago

Act version

act version 0.2.59

Feature description

Hi! I has bee fighting with containers some time, I found that if there is a problem, like something that works in our SO but does not works in the Workflow, is pretty hard be able to get access to the container/instance where for example, a step failed.

Would be great be able in some way, to get access to the container at a particular step, or in a error, so we can inspect inside it.

Thx!

ChristopherHX commented 1 week ago

you should get the container id via docker ps, it is also logged by act then docker exec -it <containerid> sh should give you access, the env vars of the job are probably missing

By default an failure in act skips container deletion, until you rerun act AFAIK On success only the reuse flag keeps the containet alive