GitHub Action to removes multiple files or folders in a cross-platform way.
Created by Mohd Mushfique (mdmush).
Make sure local and third-party actions are enabled for your repository, then follow the instructions in the Usage section.
Use this action in any step like so:
- name: Remove Files
uses: mdmush/[email protected]
with:
file-paths: |
/path/to/file1
/path/to/file2
/path/to/file3Additional Information:
- This action leverages
io.rmRF, allowing it to recursively remove files and directories. - It will still succeed even if the specified file or directory doesn't exist.
- Compatible with all environments.
- Supports removing multiple paths in a single run by listing each path separately.
- Handles both relative and absolute paths, but does not support glob patterns or wildcards.
- No protection for critical system paths. Exercise caution when using this action on self-hosted runners.
- While it can delete files from the repository within a workflow, you'll need to commit the changes manually.
MIT