A CI bridge from Forgejo/Gitea to SourceHut
Simon Ser d45436979e
All checks were successful
builds.sr.ht Job completed
Upgrade dependencies
2024-11-25 00:08:02 +01:00
buildssrht Add support for secrets 2024-10-10 23:13:36 +02:00
static Add checkbox to enable secrets 2024-10-10 23:55:19 +02:00
templates Add detailed instructions for custom Gitea instance 2024-10-23 09:09:52 +02:00
.build.yml ci: add .build.yml 2024-10-10 23:12:23 +02:00
.gitignore Initial commit 2023-04-11 14:32:38 +02:00
config.go all: prettify 2023-12-19 15:44:47 +01:00
db.go Stop de-duplicating installations per token IDs 2024-10-11 18:35:09 +02:00
gitea.go Set build job visibility 2023-12-20 13:51:09 +01:00
go.mod Upgrade dependencies 2024-11-25 00:08:02 +01:00
go.sum Upgrade dependencies 2024-11-25 00:08:02 +01:00
job.go Always unset oauth field in manifest 2024-10-11 01:00:14 +02:00
LICENSE Initial commit 2023-04-11 14:32:38 +02:00
main.go Add detailed instructions for custom Gitea instance 2024-10-23 09:09:52 +02:00
README.md readme: add section for local development 2023-12-19 12:41:47 +01:00
schema.sql schema: fix dropped username columns 2024-10-23 09:07:19 +02:00
session.go Add checkbox to enable secrets 2024-10-10 23:55:19 +02:00

yojo

A CI bridge from Forgejo/Gitea to SourceHut.

A public instance is available.

Configuration

Image for: Configuration

yojo can be configured via an scfg file by running yojo -config <path>.

Only the OAuth client ID and secrets are required.

# HTTP server listen address
listen localhost:8080
# SQLite database path
db yojo.db

# SourceHut configuration
srht {
	# OAuth client ID and secret
	client-id "..."
	client-secret "..."

	# Endpoint URLs for builds.sr.ht and meta.sr.ht
	builds-endpoint "https://builds.sr.ht"
	meta-endpoint "https://meta.sr.ht"
}

# Gitea/Forgejo configuration
gitea {
	# OAuth client ID and secret
	client-id "..."
	client-secret "..."

	# Endpoint URL
	endpoint "https://codeberg.org"
}

Local development

Image for: Local development

For local development, smee.io can be used to forward Web hooks. Install go-smee (or their offical client), then run:

smee -target "http://localhost:8080/webhook"

Grab the channel URL and start yojo like so:

yojo -config <config> -webhook-endpoint "https://smee.io/<token>"

To restart the smee client with the same channel, -proxy can be used:

smee -target "http://localhost:8080/webhook" -proxy "https://smee.io/<token>"

License

Image for: License

AGPLv3, see LICENSE.

Copyright (C) 2023 Simon Ser