-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
Possible to use this action to detect when files are deleted? #180
Comments
Thanks for reporting this issue, don't forget to star this project to help us reach a wider audience. |
If it helps, my use case for this action is to supplement other parts of my workflow that are generating documentation markdown files. In the case where some documentation no longer applies and needs to be deleted, I'm looking to use automation to detect when this file is deleted by a script further up the chain. |
That’s correct and this seems like a valid use case, I’ve added support for detecting deleted files, it should be available in the latest release. |
Great, thanks for the quick turnaround! |
Does this still work? @jackton1 name: Build
on:
push:
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- run: |
rm README.md
echo "new file" > new-file.txt
- name: Check changed files
id: changed-files
uses: tj-actions/verify-changed-files@v16
- name: Print changed files
run: |
for file in ${{ steps.changed-files.outputs.changed_files }}; do
echo "file: $file"
echo "------"
done
- run: git status It's not detecting deleted files. But successfully detected a new file. |
As far as I can tell, if the only operation that happens to the file system is that a file or files are deleted, then files_changed will return 'false'. Is that accurate? If so, any workarounds that you can think of to detect when any file changes happen (modification, addition, or deletion)?
The text was updated successfully, but these errors were encountered: