On push path run when merging master into branch

I have a workflow that runs on push and then a certain path. ( on: push: path …)

When I merge master into my branch, and the said path in my branch differed from the one merged from master, it registers as a change in the file (even though I did not change the file in my branch) and runs the workflow when pushed.

Is there a way around this?

Assuming the file has changed on master, that’s exactly what should be happening: You’ve pushed new commits that change to the file to your branch. That those commits originate from another branch doesn’t change anything.

@airtower-luna I dont think this answers the question.
in master the file is kept in a certain way.
I can make as many changes to my file in my branch, but before I push, I merge master into my branch, reverting all changes I made to the file and staying up to date with master.(technically this should register as no change with regards to master)

in this case, i do not want the workflow to be triggered. Im guessing from you answer that this isn’t possible.

The reasoning is that I want all of my team members to be able to trigger the workflow, but when they push to master, they first revert the file to match master.

I feel that this should be a feature: to have an option to run on file change, but if it is up to date with master, not to run

The push event has only to do with the branch you’re pushing and what changed on that branch with that push. If you want to compare with another branch you need to create a PR and use the pull_request event. In that case the paths filter should work on the difference between the branches. See also: Git diff comparisons