1
0
Fork
You've already forked forrus
0
forrus is a CI bridge from Forgejo to Cirrus CI.
  • Go 90.7%
  • HTML 8.9%
  • Dockerfile 0.2%
  • Makefile 0.2%
2026年04月25日 15:35:06 +02:00
cmd Add GitHub default branch, skeleton code for handling different webhook events ( #1 ) 2026年02月01日 07:32:12 +01:00
schema Add GitHub default branch, skeleton code for handling different webhook events ( #1 ) 2026年02月01日 07:32:12 +01:00
src Fix wrong cast type in cleanup expired state 2026年03月07日 11:46:24 +08:00
.cirrus.yml Fix docker build command 2026年02月08日 22:07:56 +08:00
.dockerignore [skip ci] Add Dockerfile, fix typo in README 2026年02月08日 20:23:47 +08:00
.gitignore Inject FORRUS_* variables into top level env using string manipulation 2026年02月03日 21:47:34 +08:00
config.yml.sample Init dev 2026年01月31日 12:20:52 +08:00
Dockerfile [skip ci] Dockerfile use TARGETOS TARGETARCH 2026年02月08日 21:15:52 +08:00
genqlient.yaml Init dev 2026年01月31日 12:20:52 +08:00
go.mod Init dev 2026年01月31日 12:20:52 +08:00
go.sum Init dev 2026年01月31日 12:20:52 +08:00
LICENSE Initial commit 2026年01月24日 04:03:27 +01:00
main.go Init dev 2026年01月31日 12:20:52 +08:00
Makefile Init dev 2026年01月31日 12:20:52 +08:00
README.md Add shutdown notice [skip-ci] 2026年04月25日 15:35:06 +02:00
tools.go Init dev 2026年01月31日 12:20:52 +08:00

forrus

Note: This application will stop working from 1st June 2026 due to Cirrus CI shutting down, read more on their website.

forrus (Forgejo + Cirrus CI) is a CI bridge from Forgejo to Cirrus CI.

It works by having a dummy GitHub repository as a placeholder and uses Cirrus CI API to start a build.

Getting started

Public Instance

A public instance is available for Codeberg. However, the uptime is not guaranteed and the API client is moderately rate-limited. It's highly recommended to set up your private instance of forrus by following the guide below.

Private Instance

1. Register a Codeberg / Forgejo OAuth application

Go to application setting page and register for an OAuth application, with the redirect URL set to https://<your-forrus-instance-url>/oauth/callback.

2. Configure the config.yml and database

A config.yml.sample file is provided with all the necessary fields. Fill in all of them and rename to config.yml.

3. Create the sqlite database file

Run the following command to populate all the required schemas:

sqlite3 database.db < schema/db.sql

4. Start the application

To start the application, run:

# If your config.yml is in the same location as the forrus binary:
forrus
# If your config location is in a different place:
forrus --config=/path/to/config.yml

You may want to use something like systemd to automatically start the service on boot.

Development guide

The program relies heavily on generated code for the following purposes:

  • Database struct and boilerplate code. Uses GORM
  • GraphQL client code and struct. Uses genqlient

When you modified the content in the schema/ folder, you need to generate the respective client code using GORM/genqlient:

# for GraphQL related, ie, schema/*.graphql
make gen-gql
# for database related, ie, schema/db.sql
make gen-dal

A local database can be initialized using:

make gen-local-db

Acknowledgements

The concept of forrus is inspired by yojo and cirrus-run. Part of the code has been written by vibe-coding and manually reviewed by me.

License

GPLv3, refer to LICENSE