nektos / act

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

Enhancement: Support publishing ports to host OS #569

Open bixu opened 3 years ago

bixu commented 3 years ago

Port publishing similar to Docker's --publish flag

Here's a specific use-case from my org: we run a JUnit test suite in GH Actions, and were trying to debug an issue with suite using Act, but this was difficult because the JVM remote debugger listens on a port inside the Act container and wasn't easily accessible to our dev toolset. If the maintainers would be open to adding port publishing with a flag like --publish (following Docker conventions), we'd might be able to open a PR around this.

CC: @olga-casian

jsoref commented 3 years ago

The maintainers might be open to this (it doesn't seem terribly unreasonable).

Note that there are ways that should work today:

I haven't tried any of these. I ran across someone offering a tunnel for GHA recently. I'm still trying to get my action to basically work in act, let alone fancy stuff.

Do note that you can run docker exec to connect to the running container, so you could probably bolt something on using some local ncs too.

bixu commented 3 years ago

@calleb-sumup

mzagaja commented 2 years ago

After going through a large debugging adventure with some actions today, adding this feature would be a big win for my developer experience in order to be able to connect a remote debugger to my test suite through TCP.