0

I want to run a GitHub action on push.

I want however to be able to tell the difference between a direct push and a Pull Request merge. (I don't want my workflow to run on the second case)

I have found a workaround, by allowing only Merge with Squash in which case the head commit produced has the following details in the github.event

  "committer": {
    "email": "noreply@github.com",
    "name": "GitHub",
    "username": "web-flow"
  },

Is there any workaround in case I want to avoid squashes?

pkaramol
  • 16,451
  • 43
  • 149
  • 324
  • 1
    To Git, there is no difference at all, so you'll definitely need something GitHub-specific. What that would be ... well, that's up to GitHub. – torek Dec 14 '22 at 11:00

0 Answers0