GoogleCloudPlatform / GoogleCloudPlatform/nodejs-docs-samples

Running GitHub Workflows duplicate events: push and pull_request

Đang mở
#2,891 0 bình luận 0 reaction 2 người được giao Được @sofisl nhận Xem trên GitHub
priority: p2 samples type: cleanup
Ngôn ngữ chính
JavaScript
Star
3k
Fork
2k
Merge trung bình
2 ngày 19 giờ
Pull request đã merge (30 ngày)
44

Mô tả

The GitHub Workflow template runs for each set of samples on `push` and `pull_request`.

Based on my reading of the [syntax documentation](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions), pull_request is necessary for forks.

It looks like folks contributing from a branch in the repository would trigger duplicate tests. Looking at [some data](https://github.com/GoogleCloudPlatform/nodejs-docs-samples/actions/workflows/ai-platform-snippets.yaml?query=event%3Apush), I don't see signs of duplicate work but documented points like https://docs.github.com/en/actions/using-workflows/triggering-a-workflow#using-multiple-events indicate that there should be.

Action Items from this issue should be one of:
- Removing `push` as an event trigger from each config and the template
- Adding an in-line comment to each config and the template explaining why we use both

@sofisl could you provide some insight into why we have both triggering events in the config?

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

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

Đánh giá

Issue này chưa được đánh giá.

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.