Runners
GitHub Actions offers managed virtual environments for running workflows.
In order for act
to run your workflows locally, it must run a container for the runner defined in your workflow file. Here are the images that act
uses for each runner type and size:
GitHub Runner | Micro Docker Image | Medium Docker Image | Large Docker Image |
---|---|---|---|
ubuntu-latest | node:16-buster-slim | catthehacker/ubuntu:act-latest | catthehacker/ubuntu:full-latest |
ubuntu-22.04 | node:16-bullseye-slim | catthehacker/ubuntu:act-22.04 | unavailable |
ubuntu-20.04 | node:16-buster-slim | catthehacker/ubuntu:act-20.04 | catthehacker/ubuntu:full-20.04 |
ubuntu-18.04 | node:16-buster-slim | catthehacker/ubuntu:act-18.04 | catthehacker/ubuntu:full-18.04 |
Windows and macOS based platforms are currently unsupported and won't work (see issue #97)
Default runners are intentionally incomplete
These default images do not contain all the tools that GitHub Actions offers by default in their runners.
Many things can work improperly or not at all while running those image.
Additionally, some software might still not work even if installed properly, since GitHub Actions are running in fully virtualized machines while act
is using Docker containers (e.g. Docker does not support running systemd
).
In case of any problems please create issue in respective repository (issues with act
in this repository, issues with nektos/act-environments-ubuntu:18.04
in nektos/act-environments
and issues with any image from user catthehacker
in catthehacker/docker_images
)
Alternative runner images
If you need an environment that works just like the corresponding GitHub runner then consider using an image provided by nektos/act-environments:
nektos/act-environments-ubuntu:18.04
- built from the Packer file GitHub uses in actions/virtual-environments.
:warning: :elephant: *** WARNING - this image is >18GB 😱***
catthehacker/ubuntu:full-*
- built from Packer template provided by GitHub, see catthehacker/virtual-environments-fork or catthehacker/docker_images for more information
Use an alternative runner image
To use a different image for the runner, use the -P
option.
act -P <platform>=<docker-image>
If your workflow uses ubuntu-18.04
, consider below line as an example for changing Docker image used to run that workflow:
act -P ubuntu-18.04=nektos/act-environments-ubuntu:18.04
If you use multiple platforms in your workflow, you have to specify them to change which image is used.
For example, if your workflow uses ubuntu-18.04
, ubuntu-16.04
and ubuntu-latest
, specify all platforms like below
act -P ubuntu-18.04=nektos/act-environments-ubuntu:18.04 -P ubuntu-latest=ubuntu:latest -P ubuntu-16.04=node:16-buster-slim