Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

feat: Add `sparse-checkout-aggregate` action

オープン
#4 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
github-actions, shell
領域
ci-cd, devops

調査の方向性

sources.yml の形式、GitHub Actions の使用例、および記載されている sparse-checkout コマンドから始めます。完全集約と増分集約、キャッシュ、プライベートリポジトリへのアクセス、JSON 出力がどのように動作すべきかを定義し、その後、ドキュメント化された例と出力形式に対して action を検証します。

索引モデルが issue の本文から書いたものです。

説明

enhancement new-action

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:none for minimal data transfer
  • Support incremental updates via only input
  • 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-map action
  • Triggered by trigger-remote-workflow action
主要言語
Shell
スター
0
フォーク
0
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

aRustyDev/gh のほかの issue

aRustyDev/gh の issue をすべて見る

似ている issue

Shell/Bash の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。