Support for multiple deployments in one comment
- Ngôn ngữ chính
- TypeScript
- Star
- 577
- Fork
- 74
- Merge trung bình
- 11 giờ 7 phút
- Pull request đã merge (30 ngày)
- 1
Mô tả
### Details
# Hello
I would like to ask if it is possible to replace `context.payload.comment.body` with a specific comment body that is passed through the workflow call.
The reason I’m asking is that I want to support multiple deployments from a single comment. The repository I’m working on contains many different ArgoCD-managed apps (spread across 10+ clusters).
The way we currently use `.deploy` is like this:
```
.deploy app1-enva
```
where `app1` is the application and `enva` is the cluster where we want to deploy it.
I forked the repo about 2 months ago and made it work by building a matrix from the different `.deploy` commands and then running each sequentially. However, the branch-deploy workflow wanted to use the whole comment, e.g.:
```
.deploy app1-enva .deploy app2-envb
```
So I made some changes in the code and replaced `context.payload.comment.body` with a specific `COMMENT_BODY` passed from the matrix (always the one currently deploying). This worked.
Now, I’ve been asked if there’s a way to merge this change back into the original repo so we don’t need to maintain a separate fork.
So my question is: **Is it possible to merge my changes that replace `context.payload.comment.body` with a specific comment body that gets passed in through the workflow call?** Or it would break too many things for other users?
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu bằng cách xác định workflow branch-deploy và mọi chỗ sử dụng context.payload.comment.body, sau đó đối chiếu các luồng đó với workflow input COMMENT_BODY được đề xuất và luồng triển khai dựa trên matrix. Kiểm tra cách một comment triển khai đơn lẻ hiện được phân tích và truyền qua workflow. Hoàn thành khi có thể xử lý độc lập nhiều lệnh .deploy mà không làm hỏng hành vi hiện có đối với một lệnh duy nhất.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- github-actions, typescript
- Lĩnh vực
- ci-cd, devops
- Loại issue
- Tính năng
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100