Is there any way to run act with official github runner images?
I'm having an issue at GitHub where the new ubuntu image not only seems to have firefox installed as a snap, but also re-installs it via a .deb (as a snap!) after an apt upgrade -y, where it wastes a further minute setting up snap ports and connectors for firefox - when we aren't going to use it at all, but do want to test on the latest system.
Putting aside the obvious:
- snaps suck and were a solution no-one asked for on a linux system, especially when you have a good packaging system
- using .debs to install snaps is just... bonkers. Why not just install the app, using the system packager? smh
act is great for testing workflows, but I haven't found a way to specify an official github image. Using the default ones (small and ones from catthehacker), I get a variety of issues, ranging from:
-
sudonot found -
aptnot found - unable to interact with snaps because the snap service isn't running, and I can't start it because systemd has not been set to manage the system, and snapd only works with systemd, afaik
I know I'm trying to debug an issue not related specifically to a workflow, but if I could fix this, it would be a win for our test cycle. Without access to the same environment, I haven't had any luck tracing it down - I've even tried with ubuntu 24.04 server and desktop in a vm, and whilst desktop was closest, having both a deb and the snap, I'm not 100% convinced that it's exactly the same, and I'd like to test out the run command(s) I've added to try to work around the issue without spamming GH. Also, on GH, I can't run the workflow from my branch (afaik), so submitting to GH actions doesn't help ):
I used https://github.com/mxschmitt/action-tmate once, then install act and type any cli command you wish. The large images are an 1:1 filesystem copy, if you rehydrate it into a VM / run systemd you just avoid running packer yourself using this source code https://github.com/actions/runner-images and deploy it to azure.
You are right about the fact that systemd is not started by act cli.
Well in some cases you need an even larger large variant of the image, where you get additional prewarmed caches
Starting systemd in a docker container, caused waiting for driver related jobs to time out.
to run act within tmate use -P ubuntu-latest=-self-hosted, so you do use the runner-image instead of a container
yeah, the problem is i'm not running on ubuntu, so using ubuntu-latest=-self-hosted would attempt (as far as I understand) to run the workflow on my manjaro system, which defeats the purpose of trying to track down and remove all traces of firefox, which we aren't using in tests, but which wastes about a minute with reconfiguration after being updated with an apt upgrade
the tmate approach looks interesting, but I'll have to try it in a throw-away repo: our company gets sticky about third-party actions.