Compare commits

..

176 Commits
v2.1 ... v5.1

Author SHA1 Message Date
Tonye Jack
81f32e2402 Strip leading whitespaces (#50) 2021-05-01 19:58:35 -04:00
Tonye Jack
93ab2f259e Upgraded to v5 (#49)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2021-05-01 19:22:52 -04:00
Tonye Jack
05fe5a1454 Update README.md (#48) 2021-05-01 19:17:05 -04:00
Tonye Jack
e2bd4f229f Update action.yml 2021-05-01 19:09:08 -04:00
Tonye Jack
5c76029233 Update action.yml 2021-05-01 19:00:26 -04:00
Tonye Jack
9d404b88a1 Upgraded to v5.3 (#47)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2021-05-01 16:38:20 -04:00
Tonye Jack
0e956bb09e Fixed bug with all_changed when array is empty (#46) 2021-05-01 16:35:48 -04:00
Tonye Jack
b25acb4ce7 Upgraded to v5.2 (#45)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2021-05-01 16:32:37 -04:00
Tonye Jack
0312146842 Upgraded to v5.1 (#44)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2021-05-01 16:29:02 -04:00
Tonye Jack
78879f7581 Fixed log message. 2021-05-01 16:28:18 -04:00
Tonye Jack
18496eb7e4 Added better logging. 2021-05-01 16:26:36 -04:00
Tonye Jack
b2c601819d Upgraded to v5 (#43)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2021-05-01 15:54:08 -04:00
Tonye Jack
78b9b2d0f1 Delete entrypoint.sh 2021-05-01 15:50:14 -04:00
Tonye Jack
f863cedeea Update test.yml 2021-05-01 15:49:50 -04:00
Tonye Jack
c92504a11b Update action.yml 2021-05-01 15:49:20 -04:00
Tonye Jack
6007361a95 Update README.md 2021-05-01 15:44:58 -04:00
Tonye Jack
bf8e076d73 Upgraded to v5 (#40)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2021-05-01 15:24:44 -04:00
Tonye Jack
6a4e739596 Switch to using a bash script. (#39) 2021-05-01 15:14:25 -04:00
Tonye Jack
1772038cde Update README.md 2021-05-01 14:39:03 -04:00
Tonye Jack
81657dc060 Upgraded to v4.4 (#38)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2021-05-01 14:13:29 -04:00
Tonye Jack
300e935beb Update .gitignore (#36) 2021-05-01 14:05:18 -04:00
Tonye Jack
d188a8e7a1 Update .gitignore (#34) 2021-05-01 14:03:43 -04:00
Tonye Jack
5653483733 Update action.yml 2021-05-01 14:00:06 -04:00
Tonye Jack
bdd3bf886a Add support for any changed file. (#35) 2021-05-01 13:40:36 -04:00
Tonye Jack
a0301e7e4d Update action.yml 2021-05-01 13:32:09 -04:00
Tonye Jack
23c8cafe35 Update README.md 2021-05-01 13:27:54 -04:00
Tonye Jack
8a7dfe02e7 Renamed has_changed to all_changed (#33) 2021-05-01 13:27:06 -04:00
Tonye Jack
c7eb6e4282 Update README.md 2021-05-01 13:15:09 -04:00
Tonye Jack
40dc6382c6 Update README.md 2021-05-01 13:03:29 -04:00
Tonye Jack
fd5dd8e5ad Merge pull request #32 from tj-actions/upgrade-to-v4.3
Upgraded to v4.3
2021-05-01 12:19:15 -04:00
Tonye Jack
d6f3673f2e Merge branch 'main' into upgrade-to-v4.3 2021-05-01 12:18:52 -04:00
Tonye Jack
9864173ab1 Update README.md 2021-05-01 12:17:17 -04:00
jackton1
2bcefe21d5 Upgraded from v4.2 -> v4.3 2021-05-01 16:13:47 +00:00
Tonye Jack
fcb2ab8c32 Merge pull request #31 from tj-actions/add-support-for-files 2021-05-01 12:11:02 -04:00
Tonye Jack
8e1fd96840 Update README.md 2021-05-01 12:10:19 -04:00
Tonye Jack
db67c2c65f Update action.yml 2021-05-01 12:05:17 -04:00
Tonye Jack
1137222c33 Update action.yml 2021-05-01 12:03:23 -04:00
Tonye Jack
1378377c4f Update action.yml 2021-05-01 10:44:33 -04:00
Tonye Jack
461fb0a676 Update action.yml 2021-05-01 10:24:26 -04:00
Tonye Jack
eacc417146 Update action.yml 2021-05-01 10:10:12 -04:00
Tonye Jack
86c6017967 Update action.yml 2021-05-01 09:59:48 -04:00
Tonye Jack
95ef6d6cbd Update action.yml 2021-05-01 09:36:57 -04:00
Tonye Jack
bca6aacc45 Update action.yml 2021-05-01 09:32:01 -04:00
Tonye Jack
79272641ee Update action.yml 2021-05-01 09:21:41 -04:00
Tonye Jack
168ea27d9c Update README.md 2021-05-01 09:18:46 -04:00
Tonye Jack
3d12540806 Update action.yml 2021-05-01 09:17:04 -04:00
Tonye Jack
b1f6992ec2 Update action.yml 2021-05-01 09:15:25 -04:00
Tonye Jack
1e435854e3 Update action.yml 2021-05-01 09:14:27 -04:00
Tonye Jack
fdc23e7274 Update action.yml 2021-05-01 09:06:55 -04:00
Tonye Jack
7841015a94 Update test.yml 2021-05-01 08:59:18 -04:00
Tonye Jack
932c8a5c11 Update action.yml 2021-05-01 08:57:11 -04:00
Tonye Jack
41c5eb7faa Update action.yml 2021-05-01 08:53:56 -04:00
Tonye Jack
858bda29ab Update action.yml 2021-05-01 08:52:22 -04:00
Tonye Jack
570809f09a Update action.yml 2021-05-01 08:31:24 -04:00
Tonye Jack
1f7183322d Update action.yml 2021-05-01 08:25:21 -04:00
Tonye Jack
254f56230a Update action.yml 2021-05-01 08:14:27 -04:00
Tonye Jack
5b98ea4364 Update action.yml 2021-05-01 08:02:50 -04:00
Tonye Jack
ce0e219f00 Update action.yml 2021-05-01 08:01:13 -04:00
Tonye Jack
6c57b11941 Update action.yml 2021-05-01 07:59:48 -04:00
Tonye Jack
ca0dcf8458 Update README.md 2021-05-01 07:57:27 -04:00
Tonye Jack
dc2959d455 Update test.yml 2021-05-01 07:55:01 -04:00
Tonye Jack
085386c38b Update action.yml 2021-05-01 07:49:15 -04:00
Tonye Jack
43245574e6 [WIP] Add support to filter only specific files 2021-04-30 12:04:23 -04:00
Tonye Jack
a9b4a3786b Merge pull request #30 from tj-actions/dependabot/github_actions/tj-actions/sync-release-version-v8.5
Bump tj-actions/sync-release-version from v8 to v8.5
2021-04-30 08:23:28 -04:00
dependabot[bot]
1429c1a023 Bump tj-actions/sync-release-version from v8 to v8.5
Bumps [tj-actions/sync-release-version](https://github.com/tj-actions/sync-release-version) from v8 to v8.5.
- [Release notes](https://github.com/tj-actions/sync-release-version/releases)
- [Changelog](https://github.com/tj-actions/sync-release-version/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/sync-release-version/compare/v8...c3648fd109a88e7fde67648288c2a55d1b8ece2c)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-30 11:06:40 +00:00
Tonye Jack
678cfad1af Merge pull request #29 from tj-actions/dependabot/add-v2-config-file
Upgrade to GitHub-native Dependabot
2021-04-30 07:06:00 -04:00
dependabot-preview[bot]
a35fe66804 Upgrade to GitHub-native Dependabot 2021-04-29 22:58:30 +00:00
Tonye Jack
33024fa8e2 Update README.md 2021-04-29 14:45:34 -04:00
Tonye Jack
b88d273a4d Update README.md 2021-04-29 14:44:53 -04:00
Tonye Jack
5496c5f1b0 Updated .github/workflows/auto-approve.yml 2021-04-27 15:00:56 -04:00
Tonye Jack
c306da633c Update README.md 2021-04-27 12:07:27 -04:00
Tonye Jack
6a0c3909aa Updated renovate.json 2021-04-25 19:35:16 -04:00
Renovate Bot
59919b746c Update tj-actions/github-changelog-generator action to v1.6 2021-04-25 17:40:41 +00:00
Tonye Jack
cb1a80f76a Update README.md 2021-04-24 04:57:13 -04:00
Tonye Jack
10f1fffaf6 Update README.md 2021-04-24 04:55:45 -04:00
Tonye Jack
801d25f3b0 Update README.md 2021-04-24 04:55:30 -04:00
Tonye Jack
38710bc67f Update README.md 2021-04-24 04:52:12 -04:00
Tonye Jack
357e1be510 Update README.md 2021-04-24 04:49:43 -04:00
Tonye Jack
c3105e7432 Update README.md 2021-04-24 04:49:18 -04:00
Tonye Jack
c7d680f31b Merge pull request #25 from tj-actions/update-readme
Update README.md
2021-04-24 04:48:13 -04:00
Tonye Jack
e6d9964230 Update README.md 2021-04-24 04:47:54 -04:00
Tonye Jack
177ed75445 Update README.md 2021-04-24 04:46:29 -04:00
Tonye Jack
e2b2194939 Merge pull request #24 from tj-actions/upgrade-to-v4.2
Upgraded to v4.2
2021-04-23 06:56:48 -04:00
jackton1
1ef8c96245 Upgraded from v4.1 -> v4.2 2021-04-23 10:56:12 +00:00
Tonye Jack
271bbd60fe Update action.yml 2021-04-23 06:55:01 -04:00
Tonye Jack
e629b8ea3a Merge pull request #23 from tj-actions/upgrade-to-v4.1
Upgraded to v4.1
2021-04-23 06:46:19 -04:00
jackton1
f048489251 Upgraded from v4 -> v4.1 2021-04-23 10:46:00 +00:00
Tonye Jack
e8ace0110c Update action.yml 2021-04-23 06:43:57 -04:00
Tonye Jack
e83c52fc11 Update README.md 2021-04-23 06:40:30 -04:00
Tonye Jack
853caa603d Delete CHANGELOG.md 2021-04-23 06:28:30 -04:00
Tonye Jack
17e2510d74 Update README.md 2021-04-23 06:25:35 -04:00
Tonye Jack
e858c485a2 Merge pull request #22 from tj-actions/upgrade-to-v4
Upgraded to v4
2021-04-23 06:24:47 -04:00
jackton1
19483649c5 Upgraded from v3.3 -> v4 2021-04-23 10:24:08 +00:00
Tonye Jack
c061ef1fa3 Update README.md 2021-04-23 06:22:08 -04:00
Tonye Jack
84fd7c7a42 Update README.md 2021-04-23 06:20:40 -04:00
Tonye Jack
af5a2e5d10 Update README.md 2021-04-23 06:20:04 -04:00
Tonye Jack
e8f8d088f6 Update README.md 2021-04-23 06:19:52 -04:00
Tonye Jack
c23398e584 Update test.yml 2021-04-23 06:17:20 -04:00
Tonye Jack
9352b30cc3 Update README.md 2021-04-23 06:15:57 -04:00
Tonye Jack
7b1f7ad57b Merge pull request #21 from tj-actions/add-support-for-push-events 2021-04-23 06:14:55 -04:00
Tonye Jack
e368753cac Update test.yml 2021-04-23 06:14:21 -04:00
Tonye Jack
b47ed0ffe6 Update action.yml 2021-04-23 06:13:11 -04:00
Tonye Jack
0e1d04f780 Added support for push events 2021-04-23 06:04:38 -04:00
Tonye Jack
814a7ea227 Update README.md 2021-04-22 09:03:03 -04:00
Tonye Jack
4420c3c441 Update README.md 2021-04-22 03:09:02 -04:00
Tonye Jack
feadcbc861 Merge pull request #19 from tj-actions/upgrade-to-v3.3
Upgraded to v3.3
2021-04-20 21:17:01 -04:00
jackton1
b60f5e56b6 Upgraded from v3.2 -> v3.3 2021-04-20 23:43:55 +00:00
Tonye Jack
489e2d514f Merge pull request #18 from tj-actions/remove-unused-line
Update action.yml
2021-04-20 19:42:32 -04:00
Tonye Jack
d889202b3a Update action.yml 2021-04-20 19:41:57 -04:00
Tonye Jack
9ec430d951 Updated renovate.json 2021-04-15 23:20:28 -04:00
Tonye Jack
ca2815e08c Update README.md 2021-04-11 18:27:34 -04:00
Tonye Jack
120ceacaf7 Update README.md 2021-04-11 18:07:31 -04:00
Tonye Jack
d205273c8b Update action.yml 2021-04-11 18:06:58 -04:00
Tonye Jack
cc55e77a98 Merge pull request #17 from tj-actions/upgrade-to-v3.2
Upgraded to v3.2
2021-04-11 18:02:51 -04:00
Tonye Jack
64fdc4478a Update README.md 2021-04-11 18:02:39 -04:00
jackton1
669bce6c25 Upgraded from v3.1 -> v3.2 2021-04-11 22:00:42 +00:00
Tonye Jack
8d5a33c603 Merge pull request #16 from tj-actions/feature/add-support-for-all-modified-files
Add support for all modified files
2021-04-11 17:59:11 -04:00
Tonye Jack
00d83b13d6 Update README.md 2021-04-11 17:57:15 -04:00
Tonye Jack
223d074d69 Add support for all modified files 2021-04-11 17:54:10 -04:00
Tonye Jack
d31b4186e9 Deleted .github/ISSUE_TEMPLATE.md 2021-04-09 08:28:43 -04:00
Tonye Jack
223ef07a3f Added .github/ISSUE_TEMPLATE/feature_request.md 2021-04-09 05:07:07 -04:00
Tonye Jack
5eeb83fa4e Added .github/ISSUE_TEMPLATE/bug_report.md 2021-04-09 05:06:00 -04:00
Tonye Jack
83e0ed24b0 Updated .github/workflows/sync-release-version.yml 2021-04-04 10:50:20 -04:00
Tonye Jack
737590d30e Update README.md 2021-04-04 09:11:55 -04:00
Tonye Jack
4c551d94e0 Merge pull request #14 from tj-actions/changed-triggered-events-test-action
Update test.yml
2021-04-04 09:08:38 -04:00
Tonye Jack
506d6c005e Update test.yml 2021-04-04 09:08:26 -04:00
Tonye Jack
fa5d79bbb3 Merge pull request #13 from tj-actions/upgrade-to-v3.1
Upgraded to v3.1
2021-04-04 09:06:07 -04:00
jackton1
c9e3c674ba Upgraded from v3 -> v3.1 2021-04-04 13:01:55 +00:00
Tonye Jack
fbfaba544e Update action.yml 2021-04-04 09:00:53 -04:00
Tonye Jack
417b634812 Updated .github/workflows/sync-release-version.yml 2021-04-02 12:43:14 -04:00
Tonye Jack
69ce8f5302 Update README.md 2021-04-02 12:06:01 -04:00
Tonye Jack
abf3dc48a6 Update README.md 2021-04-02 12:05:12 -04:00
Tonye Jack
36864ca8c6 Update README.md 2021-04-02 09:17:01 -04:00
Tonye Jack
689cd8a7ea Update README.md 2021-04-02 09:13:22 -04:00
Tonye Jack
715ae3d38e Update test.yml 2021-04-02 09:12:33 -04:00
Tonye Jack
a85fa79b00 Merge pull request #12 from tj-actions/upgrade-to-v3
Upgraded to v3
2021-04-02 09:11:02 -04:00
jackton1
bdade9e883 Upgraded from v2.1 -> v3 2021-04-02 13:10:37 +00:00
Tonye Jack
e18ccae8fe Update README.md 2021-04-02 09:06:46 -04:00
Tonye Jack
ffb6aef8bf Update README.md 2021-04-02 09:04:54 -04:00
Tonye Jack
fd4add0d40 Update README.md 2021-04-02 09:03:50 -04:00
Tonye Jack
049242589c Merge pull request #11 from tj-actions/updated-the-all-changed 2021-04-02 09:03:22 -04:00
Tonye Jack
33a185bbac Update test.yml 2021-04-02 09:00:06 -04:00
Tonye Jack
122b223c04 Update test.yml 2021-04-02 08:56:53 -04:00
Tonye Jack
78d6add10d Update test.yml 2021-04-02 08:54:37 -04:00
Tonye Jack
ca86f77326 Update test.yml 2021-04-02 08:52:58 -04:00
Tonye Jack
56c6262bb9 Merge branch 'main' into updated-the-all-changed 2021-04-02 08:51:02 -04:00
Tonye Jack
1c5a3415f3 Update test.yml 2021-04-02 08:49:56 -04:00
Tonye Jack
48835883f9 Update test.yml 2021-04-02 08:46:17 -04:00
Tonye Jack
8673629857 Update test.yml 2021-04-02 08:45:11 -04:00
Tonye Jack
a4321716fa Update test.yml 2021-04-02 08:44:13 -04:00
Tonye Jack
c29faf8e4f Merge branch 'main' into updated-the-all-changed 2021-04-02 08:41:58 -04:00
Tonye Jack
c2eb99504f Update test.yml 2021-04-02 08:41:38 -04:00
Tonye Jack
21c1f27d33 Update action.yml 2021-04-02 08:37:45 -04:00
Tonye Jack
6c66f86688 Merge pull request #10 from tj-actions/jackton1-patch-1 2021-04-02 08:30:43 -04:00
Tonye Jack
3a11f58d0f Update README.md 2021-04-02 08:30:22 -04:00
Tonye Jack
fc280adde0 Merge branch 'main' into jackton1-patch-1 2021-04-02 08:28:26 -04:00
Tonye Jack
66a53ea26f Update test.yml 2021-04-02 08:28:14 -04:00
Tonye Jack
6868b512ca Update test.yml 2021-04-02 08:27:48 -04:00
Tonye Jack
d3c7a0c249 Update README.md 2021-04-02 08:22:12 -04:00
Tonye Jack
3a74bab53c Update README.md 2021-04-02 08:17:42 -04:00
Tonye Jack
f41f9eb54b Update test.yml 2021-04-02 08:13:34 -04:00
Tonye Jack
ea54bfb72a Update README.md 2021-04-02 08:08:05 -04:00
Tonye Jack
68680cd505 Update README.md 2021-04-01 07:43:05 -04:00
Tonye Jack
a66004fa3e Updated .github/workflows/auto-approve.yml 2021-03-28 16:31:32 -04:00
Tonye Jack
869aee8642 Deleted .github/auto-approve.yml 2021-03-28 16:27:02 -04:00
Tonye Jack
cd917a1be7 Added .github/auto-approve.yml 2021-03-28 15:20:57 -04:00
Tonye Jack
f003c2bfa4 Updated .github/FUNDING.yml 2021-03-28 15:13:36 -04:00
Tonye Jack
40de2adecb Added .github/workflows/auto-approve.yml 2021-03-27 12:45:50 -04:00
Tonye Jack
69750fb30a Merge pull request #8 from tj-actions/test-example 2021-03-25 19:24:03 -04:00
Tonye Jack
78af41436f Update test.yml 2021-03-25 19:23:19 -04:00
Tonye Jack
12a63a5a84 Merge pull request #9 from tj-actions/renovate/configure
Configure Renovate
2021-03-25 19:22:12 -04:00
Renovate Bot
d3cc0d7b88 Add renovate.json 2021-03-25 14:59:28 +00:00
Tonye Jack
3a416d7bb8 Create FUNDING.yml 2021-03-25 06:52:15 -04:00
Tonye Jack
8a0c8897e3 Update test.yml 2021-03-20 08:09:58 -04:00
Tonye Jack
09028ea846 Merge pull request #6 from tj-actions/upgrade-to-v2.1
Upgraded to v2.1
2021-03-18 08:28:19 -04:00
jackton1
2d4ff74f14 Upgraded from v2 -> v2.1 2021-03-18 11:34:47 +00:00
13 changed files with 614 additions and 118 deletions

12
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1,12 @@
# These are supported funding model platforms
github: jackton1
patreon: # Replace with a single Patreon username
open_collective: tj-actions
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: []

View File

@@ -1,10 +0,0 @@
* changed-files:
### Description
Describe what you were trying to get done.
Tell us what happened, what went wrong, and what you expected to happen.
### What I Did
Add some details about your workflow ?

32
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@@ -0,0 +1,32 @@
---
name: Bug report
about: Create a report to help us improve
title: "[BUG]"
labels: bug
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
**Additional context**
Add any other context about the problem here.

View File

@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

7
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,7 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10

23
.github/workflows/auto-approve.yml vendored Normal file
View File

@@ -0,0 +1,23 @@
name: Auto approve
on:
pull_request_target
jobs:
auto-approve:
runs-on: ubuntu-latest
steps:
- uses: hmarr/auto-approve-action@v2
if: |
github.actor == 'dependabot[bot]' ||
github.actor == 'dependabot' ||
github.actor == 'dependabot-preview[bot]' ||
github.actor == 'dependabot-preview' ||
github.actor == 'renovate[bot]' ||
github.actor == 'renovate' ||
github.actor == 'pyup-bot' ||
github.actor == 'github-actions[bot]' ||
github.actor == 'pre-commit-ci' ||
github.actor == 'pre-commit-ci[bot]'
with:
github-token: ${{ secrets.PAT_TOKEN }}

View File

@@ -9,15 +9,19 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Sync release version
uses: tj-actions/sync-release-version@v8
with:
fetch-depth: 0
- name: Sync release version.
uses: tj-actions/sync-release-version@v8.5
id: sync-release-version
with:
pattern: 'tj-actions/changed-files@'
pattern: '${{ github.repository }}@'
paths: |
README.md
- name: Generate CHANGELOG
uses: tj-actions/github-changelog-generator@v1.3
uses: tj-actions/github-changelog-generator@v1.6
with:
output: 'HISTORY.md'
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:

View File

@@ -15,12 +15,23 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Run changed-files with defaults
id: changed-files
uses: ./
- name: Show output
run: |
echo "${{ toJSON(steps.changed-files.outputs) }}"
- name: List all modified files
run: |
for file in "${{ steps.changed-files.outputs.modified_files }}"; do
echo $file
done
- name: Run step when README.md changes
if: contains(steps.changed-files.outputs.modified_files, 'README.md')
run: |
echo "Your README.md has been modified ${{ steps.changed-files.outputs.modified_files }}."
- name: Run changed-files with comma separator
id: changed-files-comma
uses: ./
@@ -29,3 +40,24 @@ jobs:
- name: Show output
run: |
echo "${{ toJSON(steps.changed-files-comma.outputs) }}"
- name: Run changed-files with specific files
id: changed-files-specific
uses: ./
with:
files: |
.github/workflows/test.yml
action.yml
- name: Show output
run: |
echo "${{ toJSON(steps.changed-files-specific.outputs) }}"
- name: Run changed-files with specific files comma separator
id: changed-files-specific-comma
uses: ./
with:
files: |
.github/workflows/test.yml
action.yml
separator: ","
- name: Show output
run: |
echo "${{ toJSON(steps.changed-files-specific-comma.outputs) }}"

View File

@@ -1,21 +0,0 @@
# Changelog
## [v2](https://github.com/tj-actions/changed-files/tree/v2) (2021-03-14)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v1...v2)
**Merged pull requests:**
- Fixed end of string with separator [\#4](https://github.com/tj-actions/changed-files/pull/4) ([jackton1](https://github.com/jackton1))
## [v1](https://github.com/tj-actions/changed-files/tree/v1) (2021-03-05)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/7eba13b12c69e63845b6d8bf1d3453edb0549ff9...v1)
**Merged pull requests:**
- Update action.yml [\#2](https://github.com/tj-actions/changed-files/pull/2) ([jackton1](https://github.com/jackton1))
\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*

147
HISTORY.md Normal file
View File

@@ -0,0 +1,147 @@
# Changelog
## [v5](https://github.com/tj-actions/changed-files/tree/v5) (2021-05-01)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v4.4...v5)
**Merged pull requests:**
- Update README.md [\#48](https://github.com/tj-actions/changed-files/pull/48) ([jackton1](https://github.com/jackton1))
- Upgraded to v5.3 [\#47](https://github.com/tj-actions/changed-files/pull/47) ([jackton1](https://github.com/jackton1))
- Fixed bug with all\_changed when array is empty [\#46](https://github.com/tj-actions/changed-files/pull/46) ([jackton1](https://github.com/jackton1))
- Upgraded to v5.2 [\#45](https://github.com/tj-actions/changed-files/pull/45) ([jackton1](https://github.com/jackton1))
- Upgraded to v5.1 [\#44](https://github.com/tj-actions/changed-files/pull/44) ([jackton1](https://github.com/jackton1))
- Upgraded to v5 [\#43](https://github.com/tj-actions/changed-files/pull/43) ([jackton1](https://github.com/jackton1))
- Upgraded to v5 [\#40](https://github.com/tj-actions/changed-files/pull/40) ([jackton1](https://github.com/jackton1))
- Switch to using a bash script. [\#39](https://github.com/tj-actions/changed-files/pull/39) ([jackton1](https://github.com/jackton1))
- Upgraded to v4.4 [\#38](https://github.com/tj-actions/changed-files/pull/38) ([jackton1](https://github.com/jackton1))
## [v4.4](https://github.com/tj-actions/changed-files/tree/v4.4) (2021-05-01)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v4.3...v4.4)
**Merged pull requests:**
- Update .gitignore [\#36](https://github.com/tj-actions/changed-files/pull/36) ([jackton1](https://github.com/jackton1))
- Add support for any changed file. [\#35](https://github.com/tj-actions/changed-files/pull/35) ([jackton1](https://github.com/jackton1))
- Update .gitignore [\#34](https://github.com/tj-actions/changed-files/pull/34) ([jackton1](https://github.com/jackton1))
- Renamed has\_changed to all\_changed [\#33](https://github.com/tj-actions/changed-files/pull/33) ([jackton1](https://github.com/jackton1))
- Upgraded to v4.3 [\#32](https://github.com/tj-actions/changed-files/pull/32) ([jackton1](https://github.com/jackton1))
## [v4.3](https://github.com/tj-actions/changed-files/tree/v4.3) (2021-05-01)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v4.2...v4.3)
**Fixed bugs:**
- fatal error when using @v4.2 [\#28](https://github.com/tj-actions/changed-files/issues/28)
**Closed issues:**
- Dependency Dashboard [\#27](https://github.com/tj-actions/changed-files/issues/27)
- Add support for watching a subset of files. [\#20](https://github.com/tj-actions/changed-files/issues/20)
**Merged pull requests:**
- Add support to filter only specific files [\#31](https://github.com/tj-actions/changed-files/pull/31) ([jackton1](https://github.com/jackton1))
- Bump tj-actions/sync-release-version from v8 to v8.5 [\#30](https://github.com/tj-actions/changed-files/pull/30) ([dependabot[bot]](https://github.com/apps/dependabot))
- Upgrade to GitHub-native Dependabot [\#29](https://github.com/tj-actions/changed-files/pull/29) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
- Update tj-actions/github-changelog-generator action to v1.6 [\#26](https://github.com/tj-actions/changed-files/pull/26) ([renovate[bot]](https://github.com/apps/renovate))
- Update README.md [\#25](https://github.com/tj-actions/changed-files/pull/25) ([jackton1](https://github.com/jackton1))
- Upgraded to v4.2 [\#24](https://github.com/tj-actions/changed-files/pull/24) ([jackton1](https://github.com/jackton1))
## [v4.2](https://github.com/tj-actions/changed-files/tree/v4.2) (2021-04-23)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v4.1...v4.2)
**Merged pull requests:**
- Upgraded to v4.1 [\#23](https://github.com/tj-actions/changed-files/pull/23) ([jackton1](https://github.com/jackton1))
## [v4.1](https://github.com/tj-actions/changed-files/tree/v4.1) (2021-04-23)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v4...v4.1)
**Merged pull requests:**
- Upgraded to v4 [\#22](https://github.com/tj-actions/changed-files/pull/22) ([jackton1](https://github.com/jackton1))
## [v4](https://github.com/tj-actions/changed-files/tree/v4) (2021-04-23)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v3.3...v4)
**Implemented enhancements:**
- Feature request [\#15](https://github.com/tj-actions/changed-files/issues/15)
- Added support for push events [\#21](https://github.com/tj-actions/changed-files/pull/21) ([jackton1](https://github.com/jackton1))
**Merged pull requests:**
- Upgraded to v3.3 [\#19](https://github.com/tj-actions/changed-files/pull/19) ([jackton1](https://github.com/jackton1))
## [v3.3](https://github.com/tj-actions/changed-files/tree/v3.3) (2021-04-20)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v3.2...v3.3)
**Merged pull requests:**
- Update action.yml [\#18](https://github.com/tj-actions/changed-files/pull/18) ([jackton1](https://github.com/jackton1))
- Upgraded to v3.2 [\#17](https://github.com/tj-actions/changed-files/pull/17) ([jackton1](https://github.com/jackton1))
## [v3.2](https://github.com/tj-actions/changed-files/tree/v3.2) (2021-04-11)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v3.1...v3.2)
**Merged pull requests:**
- Add support for all modified files [\#16](https://github.com/tj-actions/changed-files/pull/16) ([jackton1](https://github.com/jackton1))
- Update test.yml [\#14](https://github.com/tj-actions/changed-files/pull/14) ([jackton1](https://github.com/jackton1))
- Upgraded to v3.1 [\#13](https://github.com/tj-actions/changed-files/pull/13) ([jackton1](https://github.com/jackton1))
## [v3.1](https://github.com/tj-actions/changed-files/tree/v3.1) (2021-04-04)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v3...v3.1)
**Merged pull requests:**
- Upgraded to v3 [\#12](https://github.com/tj-actions/changed-files/pull/12) ([jackton1](https://github.com/jackton1))
## [v3](https://github.com/tj-actions/changed-files/tree/v3) (2021-04-02)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v2.1...v3)
**Merged pull requests:**
- Update action.yml [\#11](https://github.com/tj-actions/changed-files/pull/11) ([jackton1](https://github.com/jackton1))
- Update README.md [\#10](https://github.com/tj-actions/changed-files/pull/10) ([jackton1](https://github.com/jackton1))
- Configure Renovate [\#9](https://github.com/tj-actions/changed-files/pull/9) ([renovate[bot]](https://github.com/apps/renovate))
- Update test.yml [\#8](https://github.com/tj-actions/changed-files/pull/8) ([jackton1](https://github.com/jackton1))
- Upgraded to v2.1 [\#6](https://github.com/tj-actions/changed-files/pull/6) ([jackton1](https://github.com/jackton1))
## [v2.1](https://github.com/tj-actions/changed-files/tree/v2.1) (2021-03-18)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v2...v2.1)
**Merged pull requests:**
- Upgraded to v2 [\#5](https://github.com/tj-actions/changed-files/pull/5) ([jackton1](https://github.com/jackton1))
## [v2](https://github.com/tj-actions/changed-files/tree/v2) (2021-03-14)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v1...v2)
**Merged pull requests:**
- Fixed end of string with separator [\#4](https://github.com/tj-actions/changed-files/pull/4) ([jackton1](https://github.com/jackton1))
## [v1](https://github.com/tj-actions/changed-files/tree/v1) (2021-03-05)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/7eba13b12c69e63845b6d8bf1d3453edb0549ff9...v1)
**Merged pull requests:**
- Update action.yml [\#2](https://github.com/tj-actions/changed-files/pull/2) ([jackton1](https://github.com/jackton1))
\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*

212
README.md
View File

@@ -1,34 +1,51 @@
[![CI](https://github.com/tj-actions/changed-files/actions/workflows/test.yml/badge.svg)](https://github.com/tj-actions/changed-files/actions/workflows/test.yml) [![Update release version.](https://github.com/tj-actions/changed-files/actions/workflows/sync-release-version.yml/badge.svg)](https://github.com/tj-actions/changed-files/actions/workflows/sync-release-version.yml)
[![CI](https://github.com/tj-actions/changed-files/actions/workflows/test.yml/badge.svg)](https://github.com/tj-actions/changed-files/actions/workflows/test.yml) [![Update release version.](https://github.com/tj-actions/changed-files/actions/workflows/sync-release-version.yml/badge.svg)](https://github.com/tj-actions/changed-files/actions/workflows/sync-release-version.yml) <a href="https://github.com/search?q=tj-actions+changed-files+path%3A.github%2Fworkflows+language%3AYAML&type=code" target="_blank" title="Public workflows that use this action."><img src="https://img.shields.io/endpoint?url=https%3A%2F%2Fapi-git-master.endbug.vercel.app%2Fapi%2Fgithub-actions%2Fused-by%3Faction%3Dtj-actions%2Fchanged-files%26badge%3Dtrue" alt="Public workflows that use this action."></a>
changed-files
-------------
Get modified files using [`git diff --diff-filter`](https://git-scm.com/docs/git-diff#Documentation/git-diff.txt---diff-filterACDMRTUXB82308203) to locate all files that have been modified relative to the default branch.
Get all modified files relative to the default branch (`pull_request*` events) or last commit (`push` events).
## Usage
## Features
- List all files that have changed
- Between the current pull request branch and the default branch
- Between the last commit and the current pushed change.
- List only a subset of files that can be used to detect changes.
- Report on a subset of files that have all change.
- Report on a subset of files that have at least one file change.
- Regex pattern matching on a subset of files.
```yaml
...
steps:
- uses: actions/checkout@v2
- name: Get modified files using defaults
id: changed-files
uses: tj-actions/changed-files@v2
- name: Get modified files using a comma separator
id: changed-files-comma
uses: tj-actions/changed-files@v2
with:
separator: ","
- name: List all added files
run: |
for file in "${{ steps.changed-files.outputs.added_files }}"; do
echo $file
done
```
## Outputs
Using the default separator.
| Acronym | Meaning |
|:---------:|:------------:|
| A | Added |
| C | Copied |
| M | Modified. |
| D | Deleted |
| R | Renamed |
| T | Type changed |
| U | Unmerged |
| X | Unknown |
| Output | type | example | description |
|:-------------------:|:------------:|:------------------------------:|:----------------------------------------:|
| all_modified_files | `string` | 'new.txt other.png ...' | Select all modified files <br /> *i.e a combination of all added, <br />copied and modified files (ACM).* |
| all_changed | `string` | `true OR false` | Returns `true` only when the filenames provided using `files` input have all changed |
| any_changed | `string` | `true OR false` | Returns `true` when any of the filenames provided using `files` input have changed |
| all_changed_files | `string` | 'new.txt other.png ...' | Select all paths (*) <br /> *i.e a combination of all options below.* |
| added_files | `string` | 'new.txt other.png ...' | Select only files that are Added (A) |
| copied_files | `string` | 'new.txt other.png ...' | Select only files that are Copied (C) |
| deleted_files | `string` | 'new.txt other.png ...' | Select only files that are Deleted (D) |
| modified_files | `string` | 'new.txt other.png ...' | Select only files that are Modified (M) |
| renamed_files | `string` | 'new.txt other.png ...' | Select only files that are Renamed (R) |
| changed_files | `string` | 'new.txt other.png ...' | Select only files that have their file type changed (T) |
| unmerged_files | `string` | 'new.txt other.png ...' | Select only files that are Unmerged (U) |
| unknown_files | `string` | 'new.txt other.png ...' | Select only files that are Unknown (X) |
## Inputs
@@ -36,44 +53,137 @@ Get modified files using [`git diff --diff-filter`](https://git-scm.com/docs/git
| Input | type | required | default | description |
|:-------------:|:-----------:|:-------------:|:----------------------------:|:-------------:|
| separator | `string` | `true` | `' '` | Separator to return outputs |
| files | `string OR string[]` | `false` | | Restricted list of specific files to watch for changes |
## Usage
> NOTE: :warning:
> * For `push` events to work you need to include `fetch-depth: 0` **OR** `fetch-depth: 2` depending on your use case.
## Outputs
```yaml
name: CI
Using the default separator.
on:
push:
branches:
- main
pull_request:
branches:
- main
| Output | type | example | description |
|:-------------------:|:------------:|:------------------------------:|:----------------------------------------:|
| added_files | `string` | 'new.txt other.png ...' | Select only files that are Added (A) |
| copied_files | `string` | 'new.txt other.png ...' | Select only files that are Copied (C) |
| deleted_files | `string` | 'new.txt other.png ...' | Select only files that are Deleted (D) |
| modified_files | `string` | 'new.txt other.png ...' | Select only files that are Modified (M) |
| renamed_files | `string` | 'new.txt other.png ...' | Select only files that are Renamed (R) |
| changed_files | `string` | 'new.txt other.png ...' | Select only files that have their type changed (T) |
| unmerged_files | `string` | 'new.txt other.png ...' | Select only files that are Unmerged (U) |
| unknown_files | `string` | 'new.txt other.png ...' | Select only files that are Unknown (X) |
| all_changed_files | `string` | 'new.txt other.png ...' | Select all paths (*) are selected if there <br/> is any file that matches other <br/> criteria in the comparison; <br/> if there is no file that <br/> matches other criteria, <br/> nothing is selected. |
jobs:
test:
runs-on: ubuntu-latest
name: Test changed-files
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # OR "2" -> To retrieve the preceding commit.
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v5
- name: List all modified files
run: |
for file in "${{ steps.changed-files.outputs.all_modified_files }}"; do
echo "$file was modified"
done
```
## Example
```yaml
...
steps:
- uses: actions/checkout@v2
- name: Get changed files using defaults
id: changed-files
uses: tj-actions/changed-files@v5
- name: Get changed files using a comma separator
id: changed-files-comma
uses: tj-actions/changed-files@v5
with:
separator: ","
- name: List all added files
run: |
for file in "${{ steps.changed-files.outputs.added_files }}"; do
echo "$file was added"
done
- name: Run step when a file changes
if: contains(steps.changed-files.outputs.modified_files, 'my-file.txt')
run: |
echo "Your file my-file.txt has been modified."
- name: Run step when a file has been deleted
if: contains(steps.changed-files.outputs.deleted_files, 'test.txt')
run: |
echo "Your test.txt has been deleted."
- name: Get specific changed files
id: changed-files-specific
uses: tj-actions/changed-files@v5
with:
files: |
my-file.txt
test.txt
new.txt
test_directory
.(py|jpeg)$
.(sql)$
^(mynewfile|custom)
- name: Run step if all files listed above have changed
if: steps.changed-files-specific.outputs.all_changed == 'true'
run: |
echo "Both my-file.txt and test.txt have changed."
- name: Run step if any of the listed files above change
if: steps.changed-files-specific.outputs.any_changed == 'true'
run: |
echo "Either my-file.txt or test.txt have changed."
```
### Running [pre-commit](https://pre-commit.com/) on all modified files
```yaml
...
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v5
- name: Pre-commit
uses: pre-commit/action@v2.0.0
with:
extra_args: -v --hook-stage push --files ${{ steps.changed-files.outputs.all_modified_files }}
token: ${{ secrets.github_token }}
```
## Example
![Screen Shot 2021-04-02 at 9 06 04 AM](https://user-images.githubusercontent.com/17484350/113418057-b9fff600-9392-11eb-84e5-f5a91bfa8b11.png)
* Free software: [MIT license](LICENSE)
Features
--------
- Added Files
- Copied Files
- Deleted Files
- Modified Files
- Renamed Files
- Changed Files
- Unmerged Files
- Unknown Files
- All Changed Files
Credits
-------

View File

@@ -1,71 +1,164 @@
name: Diff changed files
description: Diff changed files
name: Changed files
description: Get all changed files
author: tj-actions
inputs:
separator:
description: 'Split character for array output'
required: true
default: " "
files:
description: 'Check for file changes for all files listed (Defaults to the entire repo)'
required: false
default: ""
outputs:
added_files:
description: List of added files.
value: ${{ steps.changed-files.outputs.added_files }}
value: ${{ steps.changed_files.outputs.added_files }}
copied_files:
description: List of copied files.
value: ${{ steps.changed-files.outputs.copied_files }}
value: ${{ steps.changed_files.outputs.copied_files }}
deleted_files:
description: List of deleted files.
value: ${{ steps.changed-files.outputs.deleted_files }}
value: ${{ steps.changed_files.outputs.deleted_files }}
modified_files:
description: List of modified files.
value: ${{ steps.changed-files.outputs.modified_files }}
value: ${{ steps.changed_files.outputs.modified_files }}
renamed_files:
description: List of renamed files.
value: ${{ steps.changed-files.outputs.renamed_files }}
value: ${{ steps.changed_files.outputs.renamed_files }}
changed_files:
description: List of changed files.
value: ${{ steps.changed-files.outputs.changed_files }}
value: ${{ steps.changed_files.outputs.changed_files }}
unmerged_files:
description: List of unmerged files.
value: ${{ steps.changed-files.outputs.unmerged_files }}
value: ${{ steps.changed_files.outputs.unmerged_files }}
unknown_files:
description: List of unknown files.
value: ${{ steps.changed-files.outputs.unknown_files }}
value: ${{ steps.changed_files.outputs.unknown_files }}
all_changed_files:
description: List of all changed files.
value: ${{ steps.changed-files.outputs.all_changed_files }}
value: ${{ steps.changed_files.outputs.all_changed_files }}
all_modified_files:
description: List of all copied modified and added files
value: ${{ steps.changed_files.outputs.all_modified_files }}
all_changed:
description: Return true only when all files provided using the files input have all changed.
value: ${{ steps.changed_files.outputs.all_changed }}
any_changed:
description: Return true only when any files provided using the files input have changed.
value: ${{ steps.changed_files.outputs.any_changed }}
runs:
using: 'composite'
steps:
- id: changed-files
- id: changed_files
run: |
set -e
export INPUT_FILES="${{ inputs.files }}"
export INPUT_SEPARATOR="${{ inputs.separator }}"
echo "Getting head sha..."
if [[ -z $GITHUB_BASE_REF ]]; then
echo "Skipping: This should only run on pull_request.";
exit 0;
HEAD_SHA=$(git rev-parse HEAD^1 || true)
else
TARGET_BRANCH=${GITHUB_BASE_REF}
git fetch --depth=1 origin "${TARGET_BRANCH}":"${TARGET_BRANCH}"
HEAD_SHA=$(git rev-parse "${TARGET_BRANCH}" || true)
fi
echo "Using head sha: $HEAD_SHA..."
if [[ -z "$INPUT_FILES" ]]; then
echo "Getting diff..."
ADDED=$(git diff --diff-filter=A --name-only "$HEAD_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed -E "s/($INPUT_SEPARATOR)$//")
COPIED=$(git diff --diff-filter=C --name-only "$HEAD_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed -E "s/($INPUT_SEPARATOR)$//")
DELETED=$(git diff --diff-filter=D --name-only "$HEAD_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed -E "s/($INPUT_SEPARATOR)$//")
MODIFIED=$(git diff --diff-filter=M --name-only "$HEAD_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed -E "s/($INPUT_SEPARATOR)$//")
RENAMED=$(git diff --diff-filter=R --name-only "$HEAD_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed -E "s/($INPUT_SEPARATOR)$//")
CHANGED=$(git diff --diff-filter=T --name-only "$HEAD_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed -E "s/($INPUT_SEPARATOR)$//")
UNMERGED=$(git diff --diff-filter=U --name-only "$HEAD_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed -E "s/($INPUT_SEPARATOR)$//")
UNKNOWN=$(git diff --diff-filter=X --name-only "$HEAD_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed -E "s/($INPUT_SEPARATOR)$//")
ALL_CHANGED=$(git diff --diff-filter="*ACDMRTUX" --name-only "$HEAD_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed -E "s/($INPUT_SEPARATOR)$//")
ALL_MODIFIED_FILES=$(git diff --diff-filter="ACM" --name-only "$HEAD_SHA" | tr "\n" "$INPUT_SEPARATOR" | sed -E "s/($INPUT_SEPARATOR)$//")
else
ADDED_ARRAY=()
COPIED_ARRAY=()
DELETED_ARRAY=()
MODIFIED_ARRAY=()
RENAMED_ARRAY=()
CHANGED_ARRAY=()
UNMERGED_ARRAY=()
UNKNOWN_ARRAY=()
ALL_CHANGED_ARRAY=()
ALL_MODIFIED_FILES_ARRAY=()
for path in ${INPUT_FILES}
do
echo "Checking for file changes: \"${path}\"..."
IFS=" "
ADDED_ARRAY+=("$(git diff --diff-filter=A --name-only "$HEAD_SHA" | grep -E "(${path})" | xargs printf "%s$INPUT_SEPARATOR" || true)")
COPIED_ARRAY+=("$(git diff --diff-filter=C --name-only "$HEAD_SHA" | grep -E "(${path})" | xargs printf "%s$INPUT_SEPARATOR" || true)")
DELETED_ARRAY+=("$(git diff --diff-filter=D --name-only "$HEAD_SHA" | grep -E "(${path})" | xargs printf "%s$INPUT_SEPARATOR" || true)")
MODIFIED_ARRAY+=("$(git diff --diff-filter=M --name-only "$HEAD_SHA" | grep -E "(${path})" | xargs printf "%s$INPUT_SEPARATOR" || true)")
RENAMED_ARRAY+=("$(git diff --diff-filter=R --name-only "$HEAD_SHA" | grep -E "(${path})" | xargs printf "%s$INPUT_SEPARATOR" || true)")
CHANGED_ARRAY+=("$(git diff --diff-filter=T --name-only "$HEAD_SHA" | grep -E "(${path})" | xargs printf "%s$INPUT_SEPARATOR" || true)")
UNMERGED_ARRAY+=("$(git diff --diff-filter=U --name-only "$HEAD_SHA" | grep -E "(${path})" | xargs printf "%s$INPUT_SEPARATOR" || true)")
UNKNOWN_ARRAY+=("$(git diff --diff-filter=X --name-only "$HEAD_SHA" | grep -E "(${path})" | xargs printf "%s$INPUT_SEPARATOR" || true)")
ALL_CHANGED_ARRAY+=("$(git diff --diff-filter="*ACDMRTUX" --name-only "$HEAD_SHA" | grep -E "(${path})" | xargs printf "%s$INPUT_SEPARATOR" || true)")
ALL_MODIFIED_FILES_ARRAY+=("$(git diff --diff-filter="ACM" --name-only "$HEAD_SHA" | grep -E "(${path})" | xargs printf "%s$INPUT_SEPARATOR" || true)")
done
ADDED=$(echo "${ADDED_ARRAY[@]}" | sed -E "s/($INPUT_SEPARATOR)$//" | xargs)
COPIED=$(echo "${COPIED_ARRAY[@]}" | sed -E "s/($INPUT_SEPARATOR)$//" | xargs)
DELETED=$(echo "${DELETED_ARRAY[@]}" | sed -E "s/($INPUT_SEPARATOR)$//" | xargs)
MODIFIED=$(echo "${MODIFIED_ARRAY[@]}" | sed -E "s/($INPUT_SEPARATOR)$//" | xargs)
RENAMED=$(echo "${RENAMED_ARRAY[@]}" | sed -E "s/($INPUT_SEPARATOR)$//" | xargs)
CHANGED=$(echo "${CHANGED_ARRAY[@]}" | sed -E "s/($INPUT_SEPARATOR)$//" | xargs)
UNMERGED=$(echo "${UNMERGED_ARRAY[@]}" | sed -E "s/($INPUT_SEPARATOR)$//" | xargs)
UNKNOWN=$(echo "${UNKNOWN_ARRAY[@]}" | sed -E "s/($INPUT_SEPARATOR)$//" | xargs)
ALL_CHANGED=$(echo "${ALL_CHANGED_ARRAY[@]}" | sed -E "s/($INPUT_SEPARATOR)$//" | xargs)
ALL_MODIFIED_FILES=$(echo "${ALL_MODIFIED_FILES_ARRAY[@]}" | sed -E "s/($INPUT_SEPARATOR)$//" | xargs)
fi
TARGET_BRANCH=${GITHUB_BASE_REF}
CURRENT_BRANCH=${GITHUB_HEAD_REF}
echo "Added files: $ADDED"
echo "Copied files: $COPIED"
echo "Deleted files: $DELETED"
echo "Modified files: $MODIFIED"
echo "Renamed files: $RENAMED"
echo "Changed files: $CHANGED"
echo "Unmerged files: $UNMERGED"
echo "Unknown files: $UNKNOWN"
echo "All changed files: $ALL_CHANGED"
echo "All modified files: $ALL_MODIFIED_FILES"
git fetch --depth=1 origin ${TARGET_BRANCH}:${TARGET_BRANCH}
if [[ -n "$INPUT_FILES" ]]; then
# shellcheck disable=SC2001
OUTPUT_ALL_MODIFIED_FILES=$(echo "$ALL_MODIFIED_FILES" | sed "s/$INPUT_SEPARATOR/ /g")
ALL_INPUT_FILES=$(echo "$INPUT_FILES" | tr "\n" " " | xargs)
echo "Input files: ${ALL_INPUT_FILES[@]}"
echo "Output all modified files: ${OUTPUT_ALL_MODIFIED_FILES[@]}"
echo "Getting head sha..."
HEAD_SHA=$(git rev-parse ${TARGET_BRANCH} || true)
ADDED=$(git diff --diff-filter=A --name-only "$HEAD_SHA" | tr "\n" "${{ inputs.separator }}" | sed -E 's/(${{ inputs.separator }})$//')
COPIED=$(git diff --diff-filter=C --name-only "$HEAD_SHA" | tr "\n" "${{ inputs.separator }}" | sed -E 's/(${{ inputs.separator }})$//')
DELETED=$(git diff --diff-filter=D --name-only "$HEAD_SHA" | tr "\n" "${{ inputs.separator }}" | sed -E 's/(${{ inputs.separator }})$//')
MODIFIED=$(git diff --diff-filter=M --name-only "$HEAD_SHA" | tr "\n" "${{ inputs.separator }}" | sed -E 's/(${{ inputs.separator }})$//')
RENAMED=$(git diff --diff-filter=R --name-only "$HEAD_SHA" | tr "\n" "${{ inputs.separator }}" | sed -E 's/(${{ inputs.separator }})$//')
CHANGED=$(git diff --diff-filter=T --name-only "$HEAD_SHA" | tr "\n" "${{ inputs.separator }}" | sed -E 's/(${{ inputs.separator }})$//')
UNMERGED=$(git diff --diff-filter=U --name-only "$HEAD_SHA" | tr "\n" "${{ inputs.separator }}" | sed -E 's/(${{ inputs.separator }})$//')
UNKNOWN=$(git diff --diff-filter=X --name-only "$HEAD_SHA" | tr "\n" "${{ inputs.separator }}" | sed -E 's/(${{ inputs.separator }})$//')
ALL_CHANGED=$(git diff --diff-filter='*' --name-only "$HEAD_SHA" | tr "\n" "${{ inputs.separator }}" | sed -E 's/(${{ inputs.separator }})$//')
SORTED_INPUT_FILES=()
SORTED_OUTPUT_ALL_MODIFIED_FILES=()
echo "Getting diff..."
IFS=" " read -r -a SORTED_INPUT_FILES <<< "$(sort <<<"${ALL_INPUT_FILES[*]}")"
IFS=" " read -r -a SORTED_OUTPUT_ALL_MODIFIED_FILES <<< "$(sort <<<"${OUTPUT_ALL_MODIFIED_FILES[*]}")"
if [[ ${#SORTED_OUTPUT_ALL_MODIFIED_FILES[@]} -gt 0 ]]; then
echo "::set-output name=any_changed::true"
echo "Sorted input files: ${SORTED_INPUT_FILES[@]}"
echo "Sorted output all modified files: ${SORTED_OUTPUT_ALL_MODIFIED_FILES[@]}"
if [[ "${SORTED_INPUT_FILES[*]}" == "${SORTED_OUTPUT_ALL_MODIFIED_FILES[*]}" ]]; then
echo "::set-output name=all_changed::true"
else
echo "::set-output name=all_changed::false"
fi
else
echo "::set-output name=any_changed::false"
fi
fi
echo "::set-output name=added_files::$ADDED"
echo "::set-output name=copied_files::$COPIED"
echo "::set-output name=deleted_files::$DELETED"
@@ -75,8 +168,11 @@ runs:
echo "::set-output name=unmerged_files::$UNMERGED"
echo "::set-output name=unknown_files::$UNKNOWN"
echo "::set-output name=all_changed_files::$ALL_CHANGED"
echo "::set-output name=all_modified_files::$ALL_MODIFIED_FILES"
unset INPUT_FILES
unset INPUT_SEPARATOR
shell: bash
branding:
icon: git-pull-request
icon: file-text
color: white

44
renovate.json Normal file
View File

@@ -0,0 +1,44 @@
{
"extends": [
"config:base"
],
"enabled": true,
"prHourlyLimit": 10,
"prConcurrentLimit": 5,
"rebaseWhen": "behind-base-branch",
"addLabels": [
"dependencies"
],
"assignees": [
"jackton1"
],
"assignAutomerge": true,
"dependencyDashboard": true,
"dependencyDashboardAutoclose": true,
"lockFileMaintenance": {
"enabled": true,
"automerge": true
},
"packageRules": [
{
"matchUpdateTypes": ["major", "minor", "patch", "pin", "digest"],
"automerge": true,
"rebaseWhen": "behind-base-branch",
"addLabels": [
"automerge"
]
},
{
"description": "docker images",
"matchLanguages": [
"docker"
],
"matchUpdateTypes": ["major", "minor", "patch", "pin", "digest"],
"rebaseWhen": "behind-base-branch",
"addLabels": [
"automerge"
],
"automerge": true
}
]
}