Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

feat: Add `symlink-map` action

Đang mở
#5 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
github-actions, shell
Lĩnh vực
ci-cd, devops

Hướng nghiên cứu

Bắt đầu với entrypoint của GitHub Action của repository và xem xét các input links và mapping_file, bao gồm schema đã được công bố tại https://schemas.arusty.dev/gha/symlink-map/v1.schema.json. So sánh hành vi với các output của sparse-checkout-aggregate và xác minh rằng validation, symlink tương đối, việc tạo thư mục cha và chế độ clean đáp ứng đặc tả.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement new-action

Summary

Create a reusable GitHub Action that creates symlinks from an explicit list or mapping file.

Use Case

After sparse-checkout-aggregate clones documentation sources, create symlinks to make them accessible to the build tool (e.g., mdbook).

Specification

Inputs
Input Required Default Description
links No* JSON array of { source, target }
mapping_file No* Path to mapping file (must match schema)
source_prefix No Prefix for source paths (with mapping_file)
target_prefix No Prefix for target paths (with mapping_file)
clean No false Remove existing symlinks in target dirs first

*One of links or mapping_file required.

Example Usage
# From job outputs (preferred)
- uses: arustydev/gha/symlink-map@v1
  with:
    links: ${{ steps.aggregate.outputs.symlinks }}

# OR from mapping file
- uses: arustydev/gha/symlink-map@v1
  with:
    mapping_file: sources.yml
    source_prefix: .sources
    target_prefix: books
Links Format
[
  { "source": ".sources/ai/docs/src", "target": "books/ai" },
  { "source": ".sources/just/docs/src", "target": "books/just" }
]

Implementation Notes

  • Validate source paths exist before creating symlinks
  • Create parent directories for targets if needed
  • Use relative symlinks where possible
  • Support clean mode to remove stale symlinks
  • Validate against schema when using mapping_file

Schema

Schema will be published at https://schemas.arusty.dev/gha/symlink-map/v1.schema.json

See: arustydev/schemas for schema definition.

Related

  • Part of docs aggregation workflow extraction
  • Consumes outputs from sparse-checkout-aggregate action
  • Schema tracked in arustydev/schemas
Ngôn ngữ chính
Shell
Star
0
Fork
0
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của aRustyDev/gh

Tất cả issue của aRustyDev/gh

Issue tương tự

Thêm issue về Shell/Bash

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.