feat: Add `trigger-remote-workflow` action
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
Inizia con le sezioni Inputs, Auto-populated Payload ed Example Usage, quindi esamina i requisiti della GitHub API per l’invio di un evento repository_dispatch. Implementa l’action riutilizzabile in base agli inputs specificati, ai valori predefiniti del contesto, alla convalida del repository e alla gestione degli errori; il lavoro è completato quando può attivare il workflow di destinazione documentato con il payload previsto.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
Create a reusable GitHub Action that dispatches a repository_dispatch event to a target repository with auto-populated context from the source workflow.
Use Case
Enable source repositories (e.g., arustydev/ai, arustydev/just) to trigger workflows in a target repository (e.g., arustydev/docs) when their documentation changes. The action automatically populates payload context from GitHub environment variables.
Specification
Inputs
| Input | Required | Default | Description |
|---|---|---|---|
target_repo |
Yes | — | Repository to trigger (owner/repo) |
event_type |
Yes | — | Event type for repository_dispatch |
token |
Yes | — | PAT with repo scope for target |
source_repo |
No | ${{ github.repository }} |
Source repository |
ref |
No | ${{ github.ref_name }} |
Branch/tag that triggered |
sha |
No | ${{ github.sha }} |
Commit SHA |
path |
No | — | Relevant path (for filtering) |
Auto-populated Payload
{
"source_repo": "arustydev/ai",
"ref": "main",
"sha": "abc1234...",
"path": "docs/src"
}
Example Usage
- uses: arustydev/gha/trigger-remote-workflow@v1
with:
target_repo: arustydev/docs
event_type: docs-update
token: ${{ secrets.DISPATCH_TOKEN }}
path: docs/src
Implementation Notes
- Use GitHub API to send
repository_dispatchevent - Auto-detect context from
github.*environment variables when inputs not provided - Validate target_repo format (owner/repo)
- Handle API errors gracefully with clear error messages
Related
- Part of docs aggregation workflow extraction from justfile to GHA
- Works with
sparse-checkout-aggregateaction in target repo
- Lingua principale
- Shell
- Stelle
- 0
- Fork
- 0
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di aRustyDev/gh
-
dependencies github-actions
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 10/100
-
dependencies github-actions
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 15/100
-
dependencies github-actions
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 50/100
-
dependencies github-actions
Difficoltà 2/5 1-3 ore Idoneità per principianti 20/100
-
dependencies github-actions
Difficoltà 2/5 1-3 ore Idoneità per principianti 10/100
Tutte le issue di aRustyDev/gh
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
huggingface/Repo2RLEnv#163 · 1 commento ·
-
setup tools wizard offers no GitHub auth path, and setup summary doesn't recognize `gh` CLI auth Apertaarea/auth comp/cli P3 tool/skills type/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
NousResearch/hermes-agent#121131 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
bradcypert/plum#53 ·
-
tmp_watchgod.sh exceeds the 1000-line cap; the Zone A guard helpers are a clean extraction seam Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
WingedGuardian/GENesis-AGI#2301 ·