How to use Debian as a base image for running actions (or run them directly on the host)?


I would like to setup Gitea Actions for a project that requires Debian as a build environment ( - it uses live-build which must be run on the same Debian environment as the target/ISO you want to generate).

As far as I can see, act-runner is only able to use ubuntu as a base runner image - i.e. one of the values documented in Choosing the runner for a job - GitHub Docs (by the way, this is not documented in Gitea Actions docs, maybe it should be mentioned?)

Is there a way to:

  • either build a Debian-based image, and make it available to act-runner to run workflows on?
  • or run workflows for this repository directly on the host running act-runner (which runs Debian)? I am aware of the security implications, I would only use host-based actions for this specific repository - this may be the preferred solution since live-build seems to require direct access to the /proc filesystem and a few other things that are not available in container-based environments (at least this was the case the last time I tried using Gitlab CI).

Running workflows directly on the host is mentioned in the docs (“don’t do this”), but not documented.

ubuntu-latest in fact is a debian image. You can use any container you want.
You can use like below:

runs-on: ubuntu-latest
      image: <container_url>

You can also define yourself label to match your container.
ref: Design of Gitea Actions | Gitea Documentation

Thanks @lunny, after re-reading the documentation I think I understand better:

ubuntu-latest in fact is a debian image

runs-on: ubuntu-latest only means the workflow should run on runners tagged ubuntu-latest, and that if no container.image is specified, it willl run in a container using the default image for this label, which is defined when registering the runner:

$ sudo cat /var/lib/act-runner/.runner
  "labels": [

run workflows for this repository directly on the host running act-runner

To answer my own question, this can be achieved by setting the label host:host when registering the runner, and specifying runs-on: host in the workflow yml configuration.

1 Like