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%
|
Some checks are pending
test / unit (push) Waiting to run
Org migration: the action family now lives under fjord/. Repoints internal repo references (uses:, CI badges, docs, migration guides) at fjord/ and sets the action author to fjord. The old rasterstate copies are left in place. |
||
|---|---|---|
| .forgejo/workflows | ||
| src | ||
| tests | ||
| .gitignore | ||
| action.yml | ||
| CHANGELOG.md | ||
| LICENSE | ||
| Makefile | ||
| README.md | ||
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/fjord/setup-fj-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: https://rasterhub.com/fjord/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.