I want to run a workflow such that if a pull request has a certain filename pattern (amongst all commits when the pull request was opened or any subsequent commits before it’s merged ), it should run that workflow the moment a file was found matching the pattern.
I thought this would work but it doesn’t run for any commits inside the pull request that don’t have a matching file (which makes sense).
on: push: paths: - '**.md'
In essence, the moment a pull request has a file matching the filetype (whether when it was opened or due to any subsequent commit), it should run that workflow for all commits pushed to that pull request subsequently till it’s merged.
Note: The only other potential alternative I can think of is to only run the workflow when the pull request is about to be merged and give an error if that’s possible.
Note: Another inquiry: is the event pull_request.edited fired when commits are pushed into it?