You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Malini Das edited this page Oct 8, 2024
·
1 revision
GitHub Actions can be frustrating to debug. While the built-in logging features are nice, there are times when you want to debug a runner with more granularity.
When working with Github Actions Runners, you can create a Dockerfile and pre-install the packages you need to simulate your runner environment. The contents of the "ubuntu:latest" image used by GitHub Actions are documented here. You don't have to set all of that up, though.
An example from RyanJ:
I know I need a working node env with this repo's code in it, so I'll throw together something like this as a Dockerfile:
Then I can docker build that and docker run it and now I have a bash shell that's set up the same way the runners are. In the model of "GHA as Bash executors" this has been helpful, since most of the problems with debugging bash are syntax and weird error codes and working with package managers I don't have on my system. This has helped solve those problems for me while keeping development local and fast.