

Trigger workflow only on pull request MERGE
source link: https://github.community/t/trigger-workflow-only-on-pull-request-merge/17359/3
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

I saw many posts about people asking if there is a way to trigger the workflow only on MERGE, which to me seems the most useful. However I did not see any answer, so I would like to find a solution.
At the moment I am stuck with:
on:
pull_request:
types: [closed]
Which is not ideal, as it would trigger the entire process even if I dismiss or close the PR without merging and I cannot see any reason on why this should happen.
I saw also:
github.event.pull_request.merged == true
but as my understanding this would run only for a particular action not on the entire workflow.
So my question is: how can I trigger a workflow only on pull_request merge?
Thanks
There’s no way to specify that a workflow should be triggered when a pull request is merged. However, because a merged pull request always results in a push, you can use the push event to accomplish your goal. For example, let’s say that you want to run a workflow whenever a pull request is merged …
Recommend
-
48
Git Cherry-pick vs Merge Workflow Assuming I am the maintainer of a repo, and I want to pull in changes from a cont...
-
7
Copy link Contributor woodruffw
-
9
New issue trigger ptr_as_ptr inside macros #8442
-
13
Mariajose Martinez August 2, 2022 14 minute rea...
-
5
Pull Request vs. Merge Request Pull request vs. merge request,...
-
8
GitHub-Workflow-Runner
-
13
GitHub Standard Fork & Pull Request Workflow · GitHub GitHub Standard Fork & Pull Request Workflow Whether you're trying to give back to the open source community or c...
-
8
一个Merge Request 的 阶段 代码添加或修改,需要进行review 代码review结束,需要修改 重复步骤1和步骤2,直到达到可以合并的标准 MR submitter 负责提交Merge Request,并针对review做修改 ...
-
4
When You Get a Lot of Comments on a Pull Request or Merge Request 2023-11-22 09:50 folder
-
6
Schedule a GitHub pull request merge using Deno KV queuesPublished: 2023.12.21 · 5 minutes readScheduling a pull request merge at a specific date and time would be helpful in some situations. Unfortunately, this i...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK