Skip to content
Discussion options

You must be logged in to vote

This behavior is expected due to how squash merges are created.
With rebase and merge, GitHub generates real commits on main, so the paths filter works correctly.
With squash and merge, GitHub creates a single new commit and the file-level change metadata isn’t always preserved in a way that triggers paths filters on push.

This is a known limitation and has been discussed before.

If you need consistent behavior, consider triggering on pull_request with paths, and checking github.event.pull_request.merged == true, or avoid squash merges for workflows that depend on file path filters.

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by fetilla
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
Bug GitHub or a GitHub feature is not working as intended Actions Build, test, and automate your deployment pipeline with world-class CI/CD Workflow Configuration Topics about workflow files, YAML setup, job dependencies, and general workflow configuration issues Misc General discussions about GitHub Actions that don't fit other found themes.
4 participants