-
Notifications
You must be signed in to change notification settings - Fork 237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Filter files for a PR based on changes since the last commit #136
Comments
Seconding this. The ability to filter during a |
Exactly what we are looking for as well. |
Really need this, but seems the added PR is not merged for a long time. |
Also need this |
Is anyone working on that feature? |
I think it's implemented in #151, but it's not reviewed. |
Because the issue is pretty old, I ended up using another action. Might move back if that gets fixed. - name: Get all changed tf file(s) or deploy workflow changes
id: changes
uses: tj-actions/changed-files@v35
with:
since_last_remote_commit: "true"
files: |
_files_ |
WoW thanks a lot, I didn't notice this project before. @pragmaticivan is there anything that cannot be achieved vs path-filter? |
afaik this other action has way more inputs and outputs. Nothing I could notice. |
Thanks a lot! I will try this out. |
#190 should fix this. My team is using this successfully if you'd like to try it: uses: aldenquimby/paths-filter@0f9f8bf7d2c3f9b9046e7bf16096464812c69650 |
@aldenquimby What if last commit (commit1) failed but this commit (commit2) didn't do anything real to fix it (say just changed a .md file), will that lead to a workflow pass due to some checks are skipped? (but actually it should never pass). In this case, I imagine a fully safe approach will be checking a commit against the last fully ran check. |
@Superskyyy you are correct. In most cases, the default PR workflow described here is what you'll want, and you don't need any special config. This is what my team uses for all of our PRs. We only ran into an issue on an edge case where we need to diff between a tag and the latest commit on a PR. So it's not the same problem as #136 , but it does have the same solution (allowing custom base + ref on PRs), and I added both as examples in the README on #190 |
I have been using the package to run specific actions based on changes against the base branch, but to avoid the actions running every single push I was wondering if it was possible to run only based on the previous commit for a PR.
Example workflow:
I've tried adding but it seems to get ignored:
Is this functionality possible or for pull requests it can only work based on changes against the base branch?
The text was updated successfully, but these errors were encountered: