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 `trigger-remote-workflow` action

Đang mở
#3 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 các phần Inputs, Auto-populated Payload và Example Usage, sau đó xem xét các yêu cầu của GitHub API để gửi một sự kiện repository_dispatch. Triển khai action có thể tái sử dụng dựa trên các inputs được chỉ định, các giá trị mặc định của context, việc xác thực repository và xử lý lỗi; được xem là hoàn thành khi action có thể kích hoạt workflow đích đã được ghi trong tài liệu với payload mong đợi.

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 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_dispatch event
  • 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-aggregate action in target repo
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.