Information and discussions around hosted Forgejo Actions at Codeberg
Find a file
fnetX 3bd37d10fb Fix status badges
The old status was turned into a group status and received a new id.
2025-12-02 18:58:52 +01:00
README.md Fix status badges 2025-12-02 18:58:52 +01:00

Hosted Forgejo Actions

Codeberg has two hosted CI/CD solutions: Woodpecker CI and Forgejo Actions. This repository is related to information about Forgejo Actions hosted by Codeberg, but you can easily set up the runner on your own machine.

Status

Status badge Average job completion badge

The Hosted Forgejo Actions is in open beta. It has worked reliably for a several months, and the Forgejo runner matured a lot in this time.

Currently, the runner has less capacity than our hosted Woodpecker CI. We are going to expand capacity and offers through the next year. Consider chipping in financially if you can.

Your feedback helps us improve the offer at Codeberg as well as the software in Forgejo.

Depending on the target audience and your familiarity, our offer works more or less well.

  • Users familiar with Forgejo Actions: If you run simple jobs, this can save you the need to host your own runner already. Note that running the Docker daemon inside those runners is not officially supported, although building images using podman is still possible.
  • Users familiar with the GitHub Actions ecosystem: There are some differences and caveats. Please read the dedicated documentation to make yourself familiar with the differences. Codeberg's runner uses the ghcr.io/catthehacker/ubuntu:act-latest by default to provide a certain compatibility level with GitHub Actions.
  • Users familiar with other CI/CD solutions: You might run into challenges that originate both from differences in the concept of GitHub Actions as well as due to differences between GitHub and Forgejo Actions.
  • Users new to CI/CD: There are currently little guides and tutorials for getting started with Forgejo Actions specifically.

What is Forgejo Actions?

Forgejo Actions is a simple CI/CD system integrated in Forgejo, the software which powers Codeberg. It is heavily inspired by a similar feature made popular by Microsoft GitHub, and it allows to benefit from this ecosystem with minimal changes. Note that Forgejo Actions does not make compatibility guarantees and you might need to adjust workflows to run properly, but it is generally simpler than converting into another CI/CD solution.

Please also consult the Forgejo Actions user guide.

Note

Please don't say "Codeberg Actions". There is nothing special about Codeberg's hosted offer, so talking about "Forgejo Actions" is fine. It will help to reduce proliferation when searching for help and reduce confusion about potential differences.

How to use it?

Forgejo Actions is integrated in the UI. In the repository settings, visit "Units" and click the "Enable Actions" checkbox. Alternatively, an "Enable more" hint in the repo tabs can also act as a shortcut.

Please follow the instructions in the Forgejo Actions user guide to create your workflows. Then see the list of runners made available by Codeberg and adjust the runs-on field accordingly, e.g. by setting it to: runs-on: codeberg-tiny.

Our global runners will pick your job and report the status in the UI.

Available runners

The following runners are available on Codeberg. The specs are guidelines for how many resources builds are allowed to take at most, but we rely on "fair use".

Label Arch CPU RAM Runtime Notes
codeberg-tiny amd64 1 2G 2 min Intended for very lightweight jobs like linters and other helpers
codeberg-small amd64 2 4G 5 min
codeberg-medium amd64 4 6G 10 min

Warning

The RAM allocation includes writes to the filesystem. If your container has 4GB of memory, writes 1GB of dependencies and 1GB of temporary files during builds, only 2GB remain available for your actual software.

We are looking for your feedback to extend the available runners based on your needs.

Lazy runners

For each runner variant, we offer a "lazy" runner. It can generally have more delay in picking jobs, but will help us schedule jobs based on load or energy availability. If your CI jobs can wait, consider using this runner to optimize the load on our systems.

We aim for completing the job within 24 hours, and we are considering experiments like offsite runners which only run when solar energy is available.

You can select this runner by appending -lazy to the label, e.g. codeberg-tiny-lazy.

Rules and conditions

In short:

  • project must be public (and available under a free/libre license as per the Terms of Use)
  • be excellent to each other: Don't jam the queue so other projects can also benefit from our offer
  • only use the resources you really need

Running CI/CD pipelines can use significant amounts of energy. As much as it is tempting to have green checkmarks everywhere, running the jobs costs real money and has environmental costs.

Unlike other giant platforms, we do not encourage you to write "heavy" pipelines and charge you for the cost later. We expect you to carefully consider the costs and benefits from your pipelines and reduce CI/CD usage to a minimum amount necessary to guarantee consistent quality for your projects.

We invite you to participate in discussions with us on how to optimize pipelines and save unnecessary runs where possible. Additionally, we will list some common problems and have some rules in place to guard against these issues.

Available images and disk writes

Container images cost bandwidth and storage, and we would like to keep the amount of different images to a minimum. Please try to use common images that are shared between multiple jobs or only have little additional layers over common images. We'll try to maintain a list of known available images.