GoogleCloudPlatform / GoogleCloudPlatform/nodejs-docs-samples

Running GitHub Workflows duplicate events: push and pull_request

オープン
#2,891 コメント 0 件 リアクション 0 件 担当者 2 名 @sofisl が担当を希望しています GitHub で見る
priority: p2 samples type: cleanup
主要言語
JavaScript
スター
3k
フォーク
2k
平均マージ
2日 19時間
マージ済み PR(30日)
44

説明

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?

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

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

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