-
Why are you starting this discussion?Bug What GitHub Actions topic or product is this about?Workflow Configuration Discussion DetailsI have configured a github action with the following event: on:
push:
branches:
- main
paths:
- 'schemas/**'I was expecting to see the workflow triggered after a PR is merge to main and it contains some modification of a file inside schemas folder. The issue is depending on how the PR is merged the behaviour is differnt:
I found issues related like this one https://github.com/orgs/community/discussions/25812#discussioncomment-4041758, which was closed but it contains comments describing a similar behaviour. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
|
This behavior is expected due to how squash merges are created. This is a known limitation and has been discussed before. If you need consistent behavior, consider triggering on pull_request with paths, and checking |
Beta Was this translation helpful? Give feedback.
-
|
This is expected behavior due to how GitHub handles path filters on squash merges. When a PR is squashed, the resulting commit is a single new commit that may not match the original path changes individually, so workflows with paths: may not trigger. Currently, there’s no workaround to make paths: fire reliably on squash merges — the workflow will always reliably trigger on Rebase and merge or direct commits. |
Beta Was this translation helpful? Give feedback.
-
|
I spent over an entire's day worth of time chasing ghosts. If you arrive here, please be sure you don't have [skip ci] in your commits... |
Beta Was this translation helpful? Give feedback.
@Ryangr0 you are absolutly right, during PR we were comitting with [skip actions] and when you squash it for any magic reason gh actions detects that commit is part of the squash and was not being executed on main. WIth rebase it was not working neither...
At the end we implemented our own version of skip 😆 .