feat: Add `sparse-checkout-aggregate` action
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
Direzione di ricerca
Inizia dal formato di sources.yml, dall’esempio di utilizzo di GitHub Actions e dai comandi sparse-checkout elencati. Definisci come devono comportarsi l’aggregazione completa e incrementale, il caching, l’accesso ai repository privati e gli output JSON, quindi verifica l’action rispetto agli esempi e alle forme degli output documentati.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
Create a reusable GitHub Action that clones/updates multiple repositories using git sparse checkout based on a mapping file (sources.yml).
Use Case
Aggregate documentation from multiple repositories into a single build. Supports both full re-aggregation and incremental single-repo updates with caching.
Specification
Inputs
| Input | Required | Default | Description |
|---|---|---|---|
sources_file |
Yes | — | Path to sources.yml mapping file |
output_dir |
No | .sources |
Directory for cloned repos |
only |
No | — | Single repo to update (incremental mode) |
token |
No | ${{ github.token }} |
For private repos |
Outputs
| Output | Description |
|---|---|
sources |
JSON array of { key, repo, path, local_path, sha } |
symlinks |
JSON array of { source, target } for symlink-map action |
source_shas |
Hash of all repo SHAs for cache key |
Example Output
// sources
[
{ "key": "ai", "repo": "arustydev/ai", "path": "docs/src", "local_path": ".sources/ai/docs/src", "sha": "abc123" },
{ "key": "just", "repo": "arustydev/just", "path": "docs/src", "local_path": ".sources/just/docs/src", "sha": "def456" }
]
// symlinks
[
{ "source": ".sources/ai/docs/src", "target": "books/ai" },
{ "source": ".sources/just/docs/src", "target": "books/just" }
]
Sources File Format (sources.yml)
books:
ai:
repo: arustydev/ai
path: docs/src
ref: main
title: "AI Configuration"
just:
repo: arustydev/just
path: docs/src
ref: main
title: "Justfile Library"
Example Usage
- uses: arustydev/gha/sparse-checkout-aggregate@v1
id: aggregate
with:
sources_file: sources.yml
only: ${{ github.event.client_payload.source_repo }}
Implementation Notes
Sparse Checkout Commands
# New clone
git clone --filter=blob:none --sparse --depth=1 \
"https://github.com/$repo.git" ".sources/$key"
git -C ".sources/$key" sparse-checkout set "$path"
# Update existing
git -C ".sources/$key" fetch origin "$ref"
git -C ".sources/$key" checkout "origin/$ref" -- "$path"
Key Features
- Use
--filter=blob:nonefor minimal data transfer - Support incremental updates via
onlyinput - Output structured JSON for downstream actions
- Calculate SHA hash for each repo for cache invalidation
- Handle private repos via token input
Related
- Part of docs aggregation workflow extraction
- Outputs consumed by
symlink-mapaction - Triggered by
trigger-remote-workflowaction
- 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
-
area: harness bug status: needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
Human-Agent-Society/reef#625 ·
-
module: core
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
bigbluebutton/bigbluebutton#25849 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
vercel-labs/just-bash#464 ·
-
area:sandbox documentation enhancement platform:linux
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
anthropics/claude-code#96664 ·
-
cost:cheap severity:medium
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
fairagro/m4.2_sql_to_arc#227 ·