No description
- TypeScript 97.8%
- JavaScript 2.2%
Replaces the previous bash composite action with a TypeScript-based Node.js action bundled with @vercel/ncc. This removes the dependency on jq and curl on the runner side, matching the convention of official GitHub Actions like actions/checkout. Features: - Uses return_run_info: true to capture the triggered run id immediately - Polls until the run completes with configurable timeout/interval - Configurable list of conclusions that fail the action - Unit tests with Jest for dispatcher and waiter modules - check-dist workflow ensures committed bundle stays in sync with sources - Self-test workflow validates the full flow end-to-end |
||
|---|---|---|
| .forgejo/workflows | ||
| __tests__ | ||
| dist | ||
| src | ||
| .eslintignore | ||
| .eslintrc.json | ||
| .gitattributes | ||
| .gitignore | ||
| .prettierignore | ||
| .prettierrc.json | ||
| action.yml | ||
| jest.config.js | ||
| LICENSE | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
actions-dispatch-and-wait
Forgejo action to trigger a workflow_dispatch event on another repository and
wait for its completion. Written in TypeScript, distributed as a Node.js
action — no jq, curl, or shell dependencies required on the runner.
Requirements
- Forgejo instance with
return_run_infosupport on the dispatch endpoint (Forgejo PR #7193, available in Forgejo 10+) - A Forgejo token with
write:repositoryscope on the target repository
Usage
- name: Trigger downstream workflow
uses: forge.app-cp.fr/Elsie/actions-dispatch-and-wait@v1
with:
repository: Elsie/infra-copilote-api
workflow-file: ci.yml
ref: review
token: ${{ secrets.DOWNSTREAM_FORGEJO_TOKEN }}
inputs-json: |
{
"action": "apply",
"unresolved_review_id": "${{ github.head_ref }}"
}
Inputs
| Name | Required | Default | Description |
|---|---|---|---|
server-url |
no | https://forge.app-cp.fr |
Forgejo instance URL |
repository |
yes | — | Target repo (owner/name) |
workflow-file |
yes | — | Workflow filename (e.g. ci.yml) |
ref |
no | main |
Branch/tag to run the workflow on |
inputs-json |
no | {} |
JSON string of inputs to pass |
token |
yes | — | Forgejo token with write:repository |
timeout-seconds |
no | 1800 |
Max wait time in seconds |
poll-interval |
no | 15 |
Polling interval in seconds |
fail-on-conclusion |
no | failure,cancelled,timed_out,action_required |
Comma-separated conclusions that fail the action |
Outputs
| Name | Description |
|---|---|
run-id |
Numeric ID of the triggered run |
run-number |
Human-friendly run number |
run-url |
Web URL pointing to the triggered run |
conclusion |
Final conclusion (success, failure, cancelled, …) |
Development
# Install dependencies
npm install
# Run the test suite
npm test
# Lint and format
npm run lint
npm run format
# Build the bundle (must be committed)
npm run build
# Run everything before pushing
npm run all
The dist/ directory must be committed — Forgejo runners execute it
directly without running npm install. The check-dist.yml workflow ensures
the committed bundle is always in sync with the sources.
License
See LICENSE. Internal Elsie use only.