Skip to content

Does a pull_request merge always trigger the push event? #27017

Discussion options

You must be logged in to vote

Hi @actuallymentor ,

According to the configured events for your workflow, it is normal that the workflow was triggered twice.

Once the changes are merged to master branch via the PR, the PR will be closed automatically, so the event on.pull_request.closed will trigger the workflow once. Because of having changes are pushed to master branch, the event on.push will trigger the workflow once.

That’s why the workflow will be triggered twice.

If you want the workflow is triggered only when some changes are pushed to master branch, you just need to setup the push event for your workflow, and without pull_request event.

on:
 push:
   branches:
     - master
   paths:
     - 'src/**'
     - 'mod…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants