Skip to content
CodeFloe

Forgejo Actions

Forgejo Actions is developed by the Forgejo team. It allows GitHub-actions based workflows and is directly integrated into Forgejo, the software powering CodeFloe.

To run an action, you need to delegate it to an available runner. All runner have labels set which can be referenced in the runs-on field. All available labels are listed at https://codefloe.com/user/settings/actions/runners (Login required). Some labels reference multiple runners while others reference a single runner. The names aim to describe the underlying environment in a descriptive manner.

On the amd64 runners, each job gets its own Docker daemon, which is created for the job and removed when it ends. DOCKER_HOST and the client certificates under /certs reach only that daemon, so a job never sees the containers, images or volumes of another job, from your organisation or any other. Images and build caches are not kept between jobs either, so each job pulls the images it needs.

An example workflow could look like this:

name: hello-world

on:
  push:
  workflow_dispatch:

jobs:
  hello-world:
    runs-on: debian-latest
    defaults:
      run:
        shell: sh
    steps:
      - name: hello-world
        run: |
          echo "Hello, World!"
          sleep 30

Native arm64 jobs run on Apple Mac Minis, inside Linux containers. Add the arch=arm64 label to a job to request them, and list docker-rootless first when the job needs Docker:

jobs:
  image:
    runs-on: [docker-rootless, arch=arm64]
    steps:
      - uses: actions/checkout@v7
      - run: docker build -t my-image .

Each job gets its own rootless Docker daemon, which starts on the first docker command and is removed with the job. Nothing is shared between jobs, and docker build, buildx, run and compose work as usual.

Some things differ from the amd64 runners:

  • The plain docker label runs on the amd64 runners only, so [docker, arch=arm64] stays waiting forever.
  • The daemon comes with the default image of the docker-rootless label, so a job with its own container: image has no Docker daemon.
  • Jobs on other labels, such as [ubuntu-latest, arch=arm64], have no Docker daemon either.
  • Only arm64 images run, as there is no amd64 emulation.
  • --privileged containers do not work, so neither do docker/setup-qemu-action and multi-arch builds. Run those on docker.
  • DOCKER_HOST and /certs are not set up as on the amd64 runners, so do not rely on them.

All jobs run within containers. The runs-on: key specifies a compatible NodeJS image (either LTS or latest) which is able to execute Actions. You can also use the containers: key to specify an arbitrary container image for a job of yours. Note that when doing so, Actions are not supported if this image does not have NodeJS installed.

name: hello-world

on:
  push:
  workflow_dispatch:

jobs:
  hello-world:
    runs-on: debian-latest
    container:
      image: library/alpine:latest
    defaults:
      run:
        shell: sh
    steps:
      - name: hello-world
        run: |
          echo "Hello, World!"
          sleep 30

Job logs are preserved for 365 days. Artifacts are preserved for 30 days by default. Individual artifact uploads can request a different retention period with the retention-days option of actions/upload-artifact.

Forgejo checks for expired Actions logs and artifacts every day at 00:35 UTC and removes them after their retention period has elapsed. The workflow run entry can remain visible after its associated logs or artifacts have expired.

If you encounter usage issues and/or have feature requests regarding Actions itself, please report them directly in the respective Forgejo repository. If you instead face any issues using Actions on CodeFloe, you are welcome to open a thread in our Forum.