https://github.com/irvingdecarlo/get-commit-files
A GitHub action that is capable of getting all files of a specific type that were changed by the action that triggered it.
https://github.com/irvingdecarlo/get-commit-files
action actions commit git-diff github-actions
Last synced: about 1 month ago
JSON representation
A GitHub action that is capable of getting all files of a specific type that were changed by the action that triggered it.
- Host: GitHub
- URL: https://github.com/irvingdecarlo/get-commit-files
- Owner: IrvingDecarlo
- License: cc0-1.0
- Created: 2024-12-17T19:46:13.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-19T20:06:39.000Z (about 1 year ago)
- Last Synced: 2025-01-02T09:17:32.143Z (12 months ago)
- Topics: action, actions, commit, git-diff, github-actions
- Homepage:
- Size: 45.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
get-commit-files, a GitHub Action by Irving Decarlo
# What is the Action for?
get-commit-files is an Action that is capable of getting a specific file type from commits that are part of a GitHub event, such as a push. With it, you are capable of getting all files that were modified or created within said event.
> [!IMPORTANT]
> Not all GitHub event were tested, only with push actions.
## How to use
It can be used freely by any workflow. It requires 4 parameters:
1. `commits-json`: The `github.event.commits` property but as a JSON:
```
commits-json: ${{ toJson(github.event.commits) }}
```
2. `git-branch`: The GitHub branch that invoked the event:
```
git-branch: ${{ github.ref_name }}
```
3. `file-type`: The file type that you want to filter:
```
file-type: ".txt"
```
4. `file-ignore`: The file to signal that all files under a specific folder are to be ignored:
```
file-ignore: ".fileignore"
```
And it outputs:
1. `modified-files`: A comma-separated list of modified files.
## Roadmap
- [x] File Filtering
- [x] File Ignoring
- [ ] Filter multiple file types
- [ ] Test other GitHub actions
## How can I contribute
Feel free to give me any suggestions that you believe will improve the Action. Additionally, you may make your own Action that is based on this one.
Thank you!