Fan out a workflow_dispatch across many Forgejo repos with the fj CLI. Templated inputs, concurrency-limited, per-target rollup. No github.com.
  • JavaScript 69.8%
  • Shell 22.1%
  • Makefile 8.1%
Find a file
Stephen Way 462da8b917
All checks were successful
test / unit (push) Successful in 4s
Initial release: fj-fanout-dispatch-action
Trigger a workflow_dispatch across many Forgejo repos with the fj CLI,
concurrency-limited, with a per-target rollup. One push -> N downstream
builds; fills Forgejo's missing cross-repo fan-out. No github.com.

Target syntax owner/repo[:workflow][@ref], templated key=value inputs
applied to every target, max-parallel + continue-on-error. node20
action; requires fj on PATH (setup-fj-action). Dispatch-only for now
(join/rollup-on-results is a planned follow-up). Offline suite: pure
target parser + integration against a fake fj.
2026-06-01 19:40:12 -07:00
.forgejo/workflows Initial release: fj-fanout-dispatch-action 2026-06-01 19:40:12 -07:00
src Initial release: fj-fanout-dispatch-action 2026-06-01 19:40:12 -07:00
tests Initial release: fj-fanout-dispatch-action 2026-06-01 19:40:12 -07:00
.gitignore Initial release: fj-fanout-dispatch-action 2026-06-01 19:40:12 -07:00
action.yml Initial release: fj-fanout-dispatch-action 2026-06-01 19:40:12 -07:00
CHANGELOG.md Initial release: fj-fanout-dispatch-action 2026-06-01 19:40:12 -07:00
LICENSE Initial release: fj-fanout-dispatch-action 2026-06-01 19:40:12 -07:00
Makefile Initial release: fj-fanout-dispatch-action 2026-06-01 19:40:12 -07:00
README.md Initial release: fj-fanout-dispatch-action 2026-06-01 19:40:12 -07:00

fj Fan-out Dispatch

One push, N downstream builds. Trigger a workflow_dispatch across many Forgejo repos in one step, with the fj CLI: per-target workflow/ref, templated inputs, a concurrency cap, and a rollup of what dispatched. Forgejo has no native cross-repo fan-out; this fills the gap. No github.com.

Part of the Fjord Actions bundle. Needs the fj CLI on the runner, install it first with setup-fj-action.

Usage

jobs:
  fan-out:
    runs-on: [self-hosted, Linux]
    steps:
      - uses: https://rasterhub.com/rasterstate/setup-fj-action@v1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

      - uses: https://rasterhub.com/rasterstate/fj-fanout-dispatch-action@v1
        with:
          workflow: build.yml          # default for targets that omit one
          ref: main
          targets: |
            acme/app
            acme/api:release.yml
            acme/web@staging
          inputs: |
            channel=beta
            notify=true

Target syntax

One per line: owner/repo[:workflow][@ref].

Line Repo Workflow Ref
acme/app acme/app default default
acme/app:release.yml acme/app release.yml default
acme/app@v2 acme/app default v2
acme/app:release.yml@v2 acme/app release.yml v2

Inputs

Input Default Description
targets (required) Targets, one per line.
workflow Default workflow file when a target omits one.
ref each repo's default Default git ref.
inputs key=value per line, passed to every target.
max-parallel 4 Concurrent dispatches.
continue-on-error false Don't fail the step when some dispatches fail.
fj-args Extra args appended to each fj workflow run.

Outputs

Output Description
dispatched Targets dispatched successfully.
failed Targets that failed to dispatch.
results JSON array of per-target results.

Scope

This dispatches the downstream runs and reports what was triggered; it does not wait for them to finish. Joining on the results (a "5/6 green" rollup) is a planned follow-up, for now, watch them with fj run watch or have each target report back via fjord-notify.

License

MIT, see LICENSE.