Why does a merge commit not trigger an `on: push` workflow?

I’ve setup a workflow that runs on: push - with no conditions.

after merging a PR with the squash and merge option, the resultant commit on the master branch did not trigger the workflow!

I had expected that adding a commit to the master branch would be considered a “push”, regardless of “who” pushed it (in this case, the push comming from the github ui).

Is this the expected behavior? If not, how could i trigger that workflow on both on: push and when merging?

AFAIK if you configured your workflow with something similar to

on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - master

it should trigger on a merge commit treating it as “on: push”. Lately, and by that I mean since approx yesterday, there is something amiss, as this also doesn’t work for me now in this repo, and it used to work just fine in the past. Perhaps this is related to this issue? Both seem to coincide in time…

1 Like

https://github.community/t5/GitHub-Actions/Github-push-actions-suddenly-not-triggering/m-p/36988#M2753

1 Like

When a merge commit push to master, it will trigger the workflow with on:push.

There is the incident which caused your issue. https://www.githubstatus.com/incidents/42hkbtl63nmn. We have resolved it. Can you check whether it works fine in your side now?

2 Likes

all working as expected now. thank you!

Having issues with actions triggering on merge currently. Are you guys sure it wasn’t just temp. fixed?