feat: Add `sparse-checkout-aggregate` action
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
調査の方向性
sources.yml の形式、GitHub Actions の使用例、および記載されている sparse-checkout コマンドから始めます。完全集約と増分集約、キャッシュ、プライベートリポジトリへのアクセス、JSON 出力がどのように動作すべきかを定義し、その後、ドキュメント化された例と出力形式に対して action を検証します。
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- Shell
- スター
- 0
- フォーク
- 0
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
aRustyDev/gh のほかの issue
-
dependencies github-actions
難易度 1/5 1時間未満 初心者へのやさしさ 10/100
-
dependencies github-actions
難易度 1/5 1時間未満 初心者へのやさしさ 15/100
-
dependencies github-actions
難易度 1/5 1時間未満 初心者へのやさしさ 50/100
-
dependencies github-actions
難易度 2/5 1〜3時間 初心者へのやさしさ 20/100
-
dependencies github-actions
難易度 2/5 1〜3時間 初心者へのやさしさ 10/100
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
unixorn/awesome-zsh-plugins#2285 ·
メンテナーはふだん 1 日以内に返信
-
documentation priority: low
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
snapotter-hq/SnapOtter#1863 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
nasa-jpl/bespokebpv7#51 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
area/rules
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
usnistgov/macos_security#836 ·
メンテナーはふだん 1 日以内に返信