forrus

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 31, 2026 License: GPL-3.0 Imports: 4 Imported by: 0

README

forrus

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 Khan

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

# 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

AGPLv3, refer to LICENSE

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
src
dal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL