Add CI split-mirror pipeline for WarpEngine
- .woodpecker.yaml: on master pushes touching libs/ruby/warp_engine, split the subtree and force-push it to the read-only tools/warp_engine mirror; on warp_engine-v* tags, build and push the gem to the Forgejo rubygems registry - engine README documents the monorepo-first workflow and the mirror Requires a `forge_token` Woodpecker secret (repository:write + package:write). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
# Read-only split mirror: a libs/ruby/warp_engine alkönyvtárat kitükrözi a
|
||||
# tools/warp_engine repóba (fejlesztés itt, a monorepóban történik; a tükör
|
||||
# csak publikálásra való). Tag-elt release (warp_engine-v*) esetén a gem a
|
||||
# Forgejo rubygems registry-be is felmegy.
|
||||
#
|
||||
# Szükséges Woodpecker secret: forge_token — Forgejo access token
|
||||
# repository:write (tools/warp_engine) és package:write joggal.
|
||||
|
||||
when:
|
||||
- event: push
|
||||
branch: master
|
||||
path: "libs/ruby/warp_engine/**"
|
||||
- event: tag
|
||||
ref: refs/tags/warp_engine-v*
|
||||
|
||||
clone:
|
||||
git:
|
||||
image: woodpeckerci/plugin-git
|
||||
settings:
|
||||
partial: false
|
||||
depth: 0 # a subtree splithez teljes history kell
|
||||
|
||||
steps:
|
||||
split-mirror:
|
||||
image: alpine/git
|
||||
environment:
|
||||
FORGE_TOKEN:
|
||||
from_secret: forge_token
|
||||
commands:
|
||||
- apk add --no-cache git-subtree
|
||||
- git subtree split --prefix=libs/ruby/warp_engine HEAD -b warp-engine-split
|
||||
- git push --force "https://ci:$${FORGE_TOKEN}@git.teletypegames.org/tools/warp_engine.git" warp-engine-split:master
|
||||
when:
|
||||
- event: push
|
||||
branch: master
|
||||
|
||||
publish-gem:
|
||||
image: ruby:3.3-slim
|
||||
environment:
|
||||
FORGE_TOKEN:
|
||||
from_secret: forge_token
|
||||
commands:
|
||||
- cd libs/ruby/warp_engine
|
||||
- gem build warp_engine.gemspec
|
||||
- mkdir -p ~/.gem
|
||||
- printf -- '---\n:https://git.teletypegames.org/api/packages/tools/rubygems: Bearer %s\n' "$${FORGE_TOKEN}" > ~/.gem/credentials
|
||||
- chmod 600 ~/.gem/credentials
|
||||
- gem push --host https://git.teletypegames.org/api/packages/tools/rubygems warp_engine-*.gem
|
||||
when:
|
||||
- event: tag
|
||||
ref: refs/tags/warp_engine-v*
|
||||
@@ -4,6 +4,13 @@ Mountable Rails engine: a retro software catalog with a CI-pipeline-callable
|
||||
release updater, a public read-only JSON API, and ActiveAdmin resources that
|
||||
load into the host application's admin.
|
||||
|
||||
> **Development happens in the `tools/teletypegames` monorepo** under
|
||||
> `libs/ruby/warp_engine`. The standalone `tools/warp_engine` repository is a
|
||||
> **read-only split mirror** published by CI on every master push — do not
|
||||
> push to it directly. Tagged releases (`warp_engine-vX.Y.Z`) are also
|
||||
> published as a gem to the Forgejo rubygems registry
|
||||
> (`https://git.teletypegames.org/api/packages/tools/rubygems`).
|
||||
|
||||
## What it provides
|
||||
|
||||
- **Models**: `Software`, `Release`, `ReleaseAsset`, `ExternalLink`,
|
||||
|
||||
Reference in New Issue
Block a user