Compare commits
42 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
72d3bb8b33 | ||
|
|
d908ddd2ef | ||
|
|
8dc46ae460 | ||
|
|
1218e11f1e | ||
|
|
18ddeeb8bc | ||
|
|
3b614c0cfa | ||
|
|
5f89dc7d6e | ||
|
|
2d251d6924 | ||
|
|
c46761fdcd | ||
|
|
321490c60a | ||
|
|
dc88c3a0c5 | ||
|
|
2125c059c3 | ||
|
|
f6e319ef2e | ||
|
|
3d1f14f079 | ||
|
|
1abc7bec79 | ||
|
|
18dfe0dd4e | ||
|
|
c94657a1d8 | ||
|
|
c755692dde | ||
|
|
1e46f60599 | ||
|
|
f009ea4a47 | ||
|
|
7cdc68de58 | ||
|
|
734bb168e3 | ||
|
|
6e227a5e76 | ||
|
|
307c11527a | ||
|
|
5621d09ed1 | ||
|
|
8c4057e25f | ||
|
|
8f47019836 | ||
|
|
7a799a583e | ||
|
|
ae54c380bb | ||
|
|
738ce05a6a | ||
|
|
b4f323482c | ||
|
|
e957501bc3 | ||
|
|
f38b70aee3 | ||
|
|
62aa9ed8ce | ||
|
|
eada3203b5 | ||
|
|
e2d72e213a | ||
|
|
664f1245dd | ||
|
|
d41a74b958 | ||
|
|
d2e030b6ed | ||
|
|
1b73c818fe | ||
|
|
a2913c1b3d | ||
|
|
95f386689b |
@@ -150,6 +150,15 @@
|
|||||||
"contributions": [
|
"contributions": [
|
||||||
"code"
|
"code"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"login": "kenji-miyake",
|
||||||
|
"name": "Kenji Miyake",
|
||||||
|
"avatar_url": "https://avatars.githubusercontent.com/u/31987104?v=4",
|
||||||
|
"profile": "https://www.linkedin.com/in/kenji-miyake/",
|
||||||
|
"contributions": [
|
||||||
|
"code"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"contributorsPerLine": 7,
|
"contributorsPerLine": 7,
|
||||||
|
|||||||
12
.github/workflows/test.yml
vendored
12
.github/workflows/test.yml
vendored
@@ -361,6 +361,16 @@ jobs:
|
|||||||
echo '${{ toJSON(steps.changed-files.outputs) }}'
|
echo '${{ toJSON(steps.changed-files.outputs) }}'
|
||||||
shell:
|
shell:
|
||||||
bash
|
bash
|
||||||
|
- name: Run changed-files with since_last_remote_commit
|
||||||
|
id: changed-files-since-last-remote-commit
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
since_last_remote_commit: true
|
||||||
|
- name: Show output
|
||||||
|
run: |
|
||||||
|
echo '${{ toJSON(steps.changed-files-since-last-remote-commit.outputs) }}'
|
||||||
|
shell:
|
||||||
|
bash
|
||||||
- name: Run changed-files with include_all_old_new_renamed_files
|
- name: Run changed-files with include_all_old_new_renamed_files
|
||||||
id: changed-files-all-old-new-renamed-files
|
id: changed-files-all-old-new-renamed-files
|
||||||
uses: ./
|
uses: ./
|
||||||
@@ -899,7 +909,7 @@ jobs:
|
|||||||
bash
|
bash
|
||||||
- name: Run changed-files with custom sha
|
- name: Run changed-files with custom sha
|
||||||
id: changed-files-custom-sha
|
id: changed-files-custom-sha
|
||||||
if: github.event.action != 'closed'
|
if: github.event_name == 'pull_request' && github.event.action != 'closed'
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
sha: ${{ github.event.pull_request.head.sha }}
|
sha: ${{ github.event.pull_request.head.sha }}
|
||||||
|
|||||||
106
HISTORY.md
106
HISTORY.md
@@ -1,12 +1,72 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [v34.3.0](https://github.com/tj-actions/changed-files/tree/v34.3.0) (2022-11-07)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v34...v34.3.0)
|
||||||
|
|
||||||
|
## [v34](https://github.com/tj-actions/changed-files/tree/v34) (2022-11-07)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v34.2.2...v34)
|
||||||
|
|
||||||
|
**Closed issues:**
|
||||||
|
|
||||||
|
- How can I let the workflow to detect the changes only in the certain micro service? [\#766](https://github.com/tj-actions/changed-files/issues/766)
|
||||||
|
|
||||||
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
- chore: exclude fetching tags [\#776](https://github.com/tj-actions/changed-files/pull/776) ([jackton1](https://github.com/jackton1))
|
||||||
|
- chore: update test [\#775](https://github.com/tj-actions/changed-files/pull/775) ([jackton1](https://github.com/jackton1))
|
||||||
|
- Updated README.md [\#774](https://github.com/tj-actions/changed-files/pull/774) ([jackton1](https://github.com/jackton1))
|
||||||
|
- feat: add support for using the last remote commit [\#773](https://github.com/tj-actions/changed-files/pull/773) ([jackton1](https://github.com/jackton1))
|
||||||
|
- Upgraded to v34.2.2 [\#772](https://github.com/tj-actions/changed-files/pull/772) ([jackton1](https://github.com/jackton1))
|
||||||
|
|
||||||
|
## [v34.2.2](https://github.com/tj-actions/changed-files/tree/v34.2.2) (2022-11-06)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v34.2.1...v34.2.2)
|
||||||
|
|
||||||
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
- Updated README.md [\#771](https://github.com/tj-actions/changed-files/pull/771) ([jackton1](https://github.com/jackton1))
|
||||||
|
- Updated README.md [\#770](https://github.com/tj-actions/changed-files/pull/770) ([jackton1](https://github.com/jackton1))
|
||||||
|
- Updated README.md [\#769](https://github.com/tj-actions/changed-files/pull/769) ([jackton1](https://github.com/jackton1))
|
||||||
|
- docs: add kenji-miyake as a contributor for code [\#768](https://github.com/tj-actions/changed-files/pull/768) ([allcontributors[bot]](https://github.com/apps/allcontributors))
|
||||||
|
- chore: change `sha` to non-required [\#767](https://github.com/tj-actions/changed-files/pull/767) ([kenji-miyake](https://github.com/kenji-miyake))
|
||||||
|
- Upgraded to v34.2.1 [\#765](https://github.com/tj-actions/changed-files/pull/765) ([jackton1](https://github.com/jackton1))
|
||||||
|
|
||||||
|
## [v34.2.1](https://github.com/tj-actions/changed-files/tree/v34.2.1) (2022-11-05)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v34.2.0...v34.2.1)
|
||||||
|
|
||||||
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
- chore: update debug message [\#764](https://github.com/tj-actions/changed-files/pull/764) ([jackton1](https://github.com/jackton1))
|
||||||
|
- Upgraded to v34.2.0 [\#763](https://github.com/tj-actions/changed-files/pull/763) ([jackton1](https://github.com/jackton1))
|
||||||
|
|
||||||
|
## [v34.2.0](https://github.com/tj-actions/changed-files/tree/v34.2.0) (2022-11-05)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v34.1.1...v34.2.0)
|
||||||
|
|
||||||
|
**Fixed bugs:**
|
||||||
|
|
||||||
|
- \[BUG\] dir\_names + files combo ends up in error [\#757](https://github.com/tj-actions/changed-files/issues/757)
|
||||||
|
|
||||||
|
**Closed issues:**
|
||||||
|
|
||||||
|
- \[BUG\] Action failing on PR with "Unable to find merge-base in shallow clone. Please increase 'max\_fetch\_depth' to at least 340." [\#755](https://github.com/tj-actions/changed-files/issues/755)
|
||||||
|
|
||||||
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
- Updated README.md [\#762](https://github.com/tj-actions/changed-files/pull/762) ([jackton1](https://github.com/jackton1))
|
||||||
|
- chore: fixed test [\#761](https://github.com/tj-actions/changed-files/pull/761) ([jackton1](https://github.com/jackton1))
|
||||||
|
- chore: update env [\#760](https://github.com/tj-actions/changed-files/pull/760) ([jackton1](https://github.com/jackton1))
|
||||||
|
- fix: error finding merge-base [\#759](https://github.com/tj-actions/changed-files/pull/759) ([jackton1](https://github.com/jackton1))
|
||||||
|
- chore: improve test coverage [\#758](https://github.com/tj-actions/changed-files/pull/758) ([jackton1](https://github.com/jackton1))
|
||||||
|
- Updated README.md [\#756](https://github.com/tj-actions/changed-files/pull/756) ([jackton1](https://github.com/jackton1))
|
||||||
|
- Upgraded to v34.1.1 [\#754](https://github.com/tj-actions/changed-files/pull/754) ([jackton1](https://github.com/jackton1))
|
||||||
|
|
||||||
## [v34.1.1](https://github.com/tj-actions/changed-files/tree/v34.1.1) (2022-11-04)
|
## [v34.1.1](https://github.com/tj-actions/changed-files/tree/v34.1.1) (2022-11-04)
|
||||||
|
|
||||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v34...v34.1.1)
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v34.1.0...v34.1.1)
|
||||||
|
|
||||||
## [v34](https://github.com/tj-actions/changed-files/tree/v34) (2022-11-04)
|
|
||||||
|
|
||||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v34.1.0...v34)
|
|
||||||
|
|
||||||
**Merged pull requests:**
|
**Merged pull requests:**
|
||||||
|
|
||||||
@@ -114,7 +174,7 @@
|
|||||||
|
|
||||||
## [v34.0.0](https://github.com/tj-actions/changed-files/tree/v34.0.0) (2022-10-25)
|
## [v34.0.0](https://github.com/tj-actions/changed-files/tree/v34.0.0) (2022-10-25)
|
||||||
|
|
||||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v33.0.0...v34.0.0)
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v33...v34.0.0)
|
||||||
|
|
||||||
**Fixed bugs:**
|
**Fixed bugs:**
|
||||||
|
|
||||||
@@ -127,13 +187,13 @@
|
|||||||
- feat: add support for fetching more history [\#709](https://github.com/tj-actions/changed-files/pull/709) ([jackton1](https://github.com/jackton1))
|
- feat: add support for fetching more history [\#709](https://github.com/tj-actions/changed-files/pull/709) ([jackton1](https://github.com/jackton1))
|
||||||
- Upgraded to v33.0.0 [\#707](https://github.com/tj-actions/changed-files/pull/707) ([jackton1](https://github.com/jackton1))
|
- Upgraded to v33.0.0 [\#707](https://github.com/tj-actions/changed-files/pull/707) ([jackton1](https://github.com/jackton1))
|
||||||
|
|
||||||
## [v33.0.0](https://github.com/tj-actions/changed-files/tree/v33.0.0) (2022-10-21)
|
|
||||||
|
|
||||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v33...v33.0.0)
|
|
||||||
|
|
||||||
## [v33](https://github.com/tj-actions/changed-files/tree/v33) (2022-10-21)
|
## [v33](https://github.com/tj-actions/changed-files/tree/v33) (2022-10-21)
|
||||||
|
|
||||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v32.1.2...v33)
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v33.0.0...v33)
|
||||||
|
|
||||||
|
## [v33.0.0](https://github.com/tj-actions/changed-files/tree/v33.0.0) (2022-10-21)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v32.1.2...v33.0.0)
|
||||||
|
|
||||||
**Closed issues:**
|
**Closed issues:**
|
||||||
|
|
||||||
@@ -290,7 +350,7 @@
|
|||||||
|
|
||||||
## [v30](https://github.com/tj-actions/changed-files/tree/v30) (2022-09-24)
|
## [v30](https://github.com/tj-actions/changed-files/tree/v30) (2022-09-24)
|
||||||
|
|
||||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v29...v30)
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v29.0.9...v30)
|
||||||
|
|
||||||
**Fixed bugs:**
|
**Fixed bugs:**
|
||||||
|
|
||||||
@@ -306,13 +366,13 @@
|
|||||||
- chore\(deps\): update codacy/codacy-analysis-cli-action action to v4.2.0 [\#634](https://github.com/tj-actions/changed-files/pull/634) ([renovate[bot]](https://github.com/apps/renovate))
|
- chore\(deps\): update codacy/codacy-analysis-cli-action action to v4.2.0 [\#634](https://github.com/tj-actions/changed-files/pull/634) ([renovate[bot]](https://github.com/apps/renovate))
|
||||||
- Upgraded to v29.0.9 [\#633](https://github.com/tj-actions/changed-files/pull/633) ([jackton1](https://github.com/jackton1))
|
- Upgraded to v29.0.9 [\#633](https://github.com/tj-actions/changed-files/pull/633) ([jackton1](https://github.com/jackton1))
|
||||||
|
|
||||||
## [v29](https://github.com/tj-actions/changed-files/tree/v29) (2022-09-20)
|
|
||||||
|
|
||||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v29.0.9...v29)
|
|
||||||
|
|
||||||
## [v29.0.9](https://github.com/tj-actions/changed-files/tree/v29.0.9) (2022-09-20)
|
## [v29.0.9](https://github.com/tj-actions/changed-files/tree/v29.0.9) (2022-09-20)
|
||||||
|
|
||||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v29.0.8...v29.0.9)
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v29...v29.0.9)
|
||||||
|
|
||||||
|
## [v29](https://github.com/tj-actions/changed-files/tree/v29) (2022-09-20)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v29.0.8...v29)
|
||||||
|
|
||||||
**Implemented enhancements:**
|
**Implemented enhancements:**
|
||||||
|
|
||||||
@@ -1755,7 +1815,7 @@
|
|||||||
|
|
||||||
## [v7](https://github.com/tj-actions/changed-files/tree/v7) (2021-06-09)
|
## [v7](https://github.com/tj-actions/changed-files/tree/v7) (2021-06-09)
|
||||||
|
|
||||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v6...v7)
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v6.3...v7)
|
||||||
|
|
||||||
**Closed issues:**
|
**Closed issues:**
|
||||||
|
|
||||||
@@ -1771,13 +1831,13 @@
|
|||||||
- Update tj-actions/sync-release-version action to v8.7 [\#86](https://github.com/tj-actions/changed-files/pull/86) ([renovate[bot]](https://github.com/apps/renovate))
|
- Update tj-actions/sync-release-version action to v8.7 [\#86](https://github.com/tj-actions/changed-files/pull/86) ([renovate[bot]](https://github.com/apps/renovate))
|
||||||
- Upgraded to v6.3 [\#85](https://github.com/tj-actions/changed-files/pull/85) ([jackton1](https://github.com/jackton1))
|
- Upgraded to v6.3 [\#85](https://github.com/tj-actions/changed-files/pull/85) ([jackton1](https://github.com/jackton1))
|
||||||
|
|
||||||
## [v6](https://github.com/tj-actions/changed-files/tree/v6) (2021-05-26)
|
|
||||||
|
|
||||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v6.3...v6)
|
|
||||||
|
|
||||||
## [v6.3](https://github.com/tj-actions/changed-files/tree/v6.3) (2021-05-26)
|
## [v6.3](https://github.com/tj-actions/changed-files/tree/v6.3) (2021-05-26)
|
||||||
|
|
||||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v6.2...v6.3)
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v6...v6.3)
|
||||||
|
|
||||||
|
## [v6](https://github.com/tj-actions/changed-files/tree/v6) (2021-05-26)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v6.2...v6)
|
||||||
|
|
||||||
**Merged pull requests:**
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
|||||||
53
README.md
53
README.md
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
||||||
|
|
||||||
[](#contributors-)
|
[](#contributors-)
|
||||||
|
|
||||||
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
||||||
|
|
||||||
@@ -94,6 +94,8 @@ jobs:
|
|||||||
echo "List all the files that have changed: ${{ steps.changed-files-specific.outputs.all_changed_files }}"
|
echo "List all the files that have changed: ${{ steps.changed-files-specific.outputs.all_changed_files }}"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
I want to thank everyone supporting and using this project, your are awesome. Special thanks to every contributor.
|
||||||
|
|
||||||
If you feel generous and want to show some extra appreciation:
|
If you feel generous and want to show some extra appreciation:
|
||||||
|
|
||||||
Support this project with a :star:
|
Support this project with a :star:
|
||||||
@@ -151,28 +153,29 @@ Support this project with a :star:
|
|||||||
|
|
||||||
<!-- AUTO-DOC-INPUT:START - Do not remove or modify this section -->
|
<!-- AUTO-DOC-INPUT:START - Do not remove or modify this section -->
|
||||||
|
|
||||||
| INPUT | TYPE | REQUIRED | DEFAULT | DESCRIPTION |
|
| INPUT | TYPE | REQUIRED | DEFAULT | DESCRIPTION |
|
||||||
|-----------------------------------|--------|----------|-----------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|-----------------------------------|--------|----------|-----------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||||
| base\_sha | string | false | | Specify a different base commit<br>SHA used for comparing changes<br> |
|
| base\_sha | string | false | | Specify a different base commit<br>SHA used for comparing changes<br> |
|
||||||
| diff\_relative | string | false | | Exclude changes outside the current<br>directory and show pathnames relative<br>to it. **NOTE:** This requires<br>you to specify the top<br>level directory via the `path`<br>input. |
|
| diff\_relative | string | false | | Exclude changes outside the current<br>directory and show pathnames relative<br>to it. **NOTE:** This requires<br>you to specify the top<br>level directory via the `path`<br>input. |
|
||||||
| dir\_names | string | false | `"false"` | Output unique changed directories instead<br>of filenames. **NOTE:** This returns<br>`.` for changed files located<br>in the root of the<br>project. |
|
| dir\_names | string | false | `"false"` | Output unique changed directories instead<br>of filenames. **NOTE:** This returns<br>`.` for changed files located<br>in the root of the<br>project. |
|
||||||
| fetch\_depth | string | false | `"40"` | Limit depth of the branch<br>history fetched. **NOTE**: This can<br>be adjusted to resolve errors<br>with insufficient history. |
|
| fetch\_depth | string | false | `"40"` | Limit depth of the branch<br>history fetched. **NOTE**: This can<br>be adjusted to resolve errors<br>with insufficient history. |
|
||||||
| files | string | false | | File and directory patterns to<br>detect changes using only these<br>list of file(s) (Defaults to<br>the entire repo) **NOTE:** Multiline<br>file/directory patterns should not include<br>qoutes. |
|
| files | string | false | | File and directory patterns to<br>detect changes using only these<br>list of file(s) (Defaults to<br>the entire repo) **NOTE:** Multiline<br>file/directory patterns should not include<br>qoutes. |
|
||||||
| files\_from\_source\_file | string | false | | Source file(s) used to populate<br>the `files` input. |
|
| files\_from\_source\_file | string | false | | Source file(s) used to populate<br>the `files` input. |
|
||||||
| files\_ignore | string | false | | Ignore changes to these file(s)<br>**NOTE:** Multiline file/directory patterns should<br>not include qoutes. |
|
| files\_ignore | string | false | | Ignore changes to these file(s)<br>**NOTE:** Multiline file/directory patterns should<br>not include qoutes. |
|
||||||
| files\_ignore\_from\_source\_file | string | false | | Source file(s) used to populate<br>the `files_ignore` input |
|
| files\_ignore\_from\_source\_file | string | false | | Source file(s) used to populate<br>the `files_ignore` input |
|
||||||
| files\_ignore\_separator | string | false | `"\n"` | Separator used to split the<br>`files-ignore` input |
|
| files\_ignore\_separator | string | false | `"\n"` | Separator used to split the<br>`files-ignore` input |
|
||||||
| files\_separator | string | false | `"\n"` | Separator used to split the<br>`files` input |
|
| files\_separator | string | false | `"\n"` | Separator used to split the<br>`files` input |
|
||||||
| include\_all\_old\_new\_renamed\_files | string | false | `"false"` | Include `all_old_new_renamed_files` output. Note this<br>can generate a large output<br>See: [#501](https://github.com/tj-actions/changed-files/issues/501). |
|
| include\_all\_old\_new\_renamed\_files | string | false | `"false"` | Include `all_old_new_renamed_files` output. Note this<br>can generate a large output<br>See: [#501](https://github.com/tj-actions/changed-files/issues/501). |
|
||||||
| json | string | false | `"false"` | Output list of changed files<br>in a JSON formatted string<br>which can be used for<br>matrix jobs. |
|
| json | string | false | `"false"` | Output list of changed files<br>in a JSON formatted string<br>which can be used for<br>matrix jobs. |
|
||||||
| old\_new\_files\_separator | string | false | `" "` | Split character for multiple old<br>and new filename pairs. |
|
| old\_new\_files\_separator | string | false | `" "` | Split character for multiple old<br>and new filename pairs. |
|
||||||
| old\_new\_separator | string | false | `","` | Split character for old and<br>new filename pairs. |
|
| old\_new\_separator | string | false | `","` | Split character for old and<br>new filename pairs. |
|
||||||
| path | string | false | `"."` | Specify a relative path under<br>`$GITHUB_WORKSPACE` to locate the repository.<br> |
|
| path | string | false | `"."` | Specify a relative path under<br>`$GITHUB_WORKSPACE` to locate the repository.<br> |
|
||||||
| quotepath | string | false | `"true"` | Use non ascii characters to<br>match files and output the<br>filenames completely verbatim by setting<br>this to `false` |
|
| quotepath | string | false | `"true"` | Use non ascii characters to<br>match files and output the<br>filenames completely verbatim by setting<br>this to `false` |
|
||||||
| separator | string | false | `" "` | Split character for output strings<br> |
|
| separator | string | false | `" "` | Split character for output strings<br> |
|
||||||
| sha | string | true | `"${{ github.sha }}"` | Specify a different commit SHA<br>used for comparing changes |
|
| sha | string | false | `"${{ github.sha }}"` | Specify a different commit SHA<br>used for comparing changes |
|
||||||
| since | string | false | | Get changed files for commits<br>whose timestamp is older than<br>the given time. |
|
| since | string | false | | Get changed files for commits<br>whose timestamp is older than<br>the given time. |
|
||||||
| until | string | false | | Get changed files for commits<br>whose timestamp is earlier than<br>the given time. |
|
| since\_last\_remote\_commit | string | true | `"false"` | Use the last commit on<br>the remote branch as the<br>`base_sha`. Defaults to the last<br>non merge commit on the<br>target branch for pull request<br>events and the previous commit<br>of the current branch for<br>push events. |
|
||||||
|
| until | string | false | | Get changed files for commits<br>whose timestamp is earlier than<br>the given time. |
|
||||||
|
|
||||||
<!-- AUTO-DOC-INPUT:END -->
|
<!-- AUTO-DOC-INPUT:END -->
|
||||||
|
|
||||||
@@ -592,9 +595,10 @@ This package was created with [Cookiecutter](https://github.com/cookiecutter/coo
|
|||||||
* [tj-actions/glob](https://github.com/tj-actions/glob)
|
* [tj-actions/glob](https://github.com/tj-actions/glob)
|
||||||
* [tj-actions/demo](https://github.com/tj-actions/demo)
|
* [tj-actions/demo](https://github.com/tj-actions/demo)
|
||||||
* [tj-actions/demo2](https://github.com/tj-actions/demo2)
|
* [tj-actions/demo2](https://github.com/tj-actions/demo2)
|
||||||
|
* [tj-actions/demo3](https://github.com/tj-actions/demo3)
|
||||||
* [tj-actions/release-tagger](https://github.com/tj-actions/release-tagger)
|
* [tj-actions/release-tagger](https://github.com/tj-actions/release-tagger)
|
||||||
* [tj-actions/auto-doc](https://github.com/tj-actions/auto-doc)
|
* [tj-actions/auto-doc](https://github.com/tj-actions/auto-doc)
|
||||||
* \[tj-actions/verify-changed-files]\(https://github.com/tj-actions/verify-changed-files
|
* [tj-actions/verify-changed-files](https://github.com/tj-actions/verify-changed-files)
|
||||||
|
|
||||||
## Report Bugs
|
## Report Bugs
|
||||||
|
|
||||||
@@ -639,6 +643,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
|
|||||||
<tr>
|
<tr>
|
||||||
<td align="center"><a href="https://github.com/kostiantyn-korniienko-aurea"><img src="https://avatars.githubusercontent.com/u/37180625?v=4?s=100" width="100px;" alt="Kostiantyn Korniienko"/><br /><sub><b>Kostiantyn Korniienko</b></sub></a><br /><a href="https://github.com/tj-actions/changed-files/commits?author=kostiantyn-korniienko-aurea" title="Documentation">📖</a></td>
|
<td align="center"><a href="https://github.com/kostiantyn-korniienko-aurea"><img src="https://avatars.githubusercontent.com/u/37180625?v=4?s=100" width="100px;" alt="Kostiantyn Korniienko"/><br /><sub><b>Kostiantyn Korniienko</b></sub></a><br /><a href="https://github.com/tj-actions/changed-files/commits?author=kostiantyn-korniienko-aurea" title="Documentation">📖</a></td>
|
||||||
<td align="center"><a href="https://github.com/lpulley"><img src="https://avatars.githubusercontent.com/u/7193187?v=4?s=100" width="100px;" alt="Logan Pulley"/><br /><sub><b>Logan Pulley</b></sub></a><br /><a href="https://github.com/tj-actions/changed-files/commits?author=lpulley" title="Code">💻</a></td>
|
<td align="center"><a href="https://github.com/lpulley"><img src="https://avatars.githubusercontent.com/u/7193187?v=4?s=100" width="100px;" alt="Logan Pulley"/><br /><sub><b>Logan Pulley</b></sub></a><br /><a href="https://github.com/tj-actions/changed-files/commits?author=lpulley" title="Code">💻</a></td>
|
||||||
|
<td align="center"><a href="https://www.linkedin.com/in/kenji-miyake/"><img src="https://avatars.githubusercontent.com/u/31987104?v=4?s=100" width="100px;" alt="Kenji Miyake"/><br /><sub><b>Kenji Miyake</b></sub></a><br /><a href="https://github.com/tj-actions/changed-files/commits?author=kenji-miyake" title="Code">💻</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ inputs:
|
|||||||
default: ""
|
default: ""
|
||||||
sha:
|
sha:
|
||||||
description: "Specify a different commit SHA used for comparing changes"
|
description: "Specify a different commit SHA used for comparing changes"
|
||||||
required: true
|
required: false
|
||||||
default: ${{ github.sha }}
|
default: ${{ github.sha }}
|
||||||
base_sha:
|
base_sha:
|
||||||
description: "Specify a different base commit SHA used for comparing changes"
|
description: "Specify a different base commit SHA used for comparing changes"
|
||||||
@@ -81,6 +81,10 @@ inputs:
|
|||||||
description: "Limit depth of the branch history fetched. **NOTE**: This can be adjusted to resolve errors with insufficient history."
|
description: "Limit depth of the branch history fetched. **NOTE**: This can be adjusted to resolve errors with insufficient history."
|
||||||
required: false
|
required: false
|
||||||
default: "40"
|
default: "40"
|
||||||
|
since_last_remote_commit:
|
||||||
|
description: "Use the last commit on the remote branch as the `base_sha`. Defaults to the last non merge commit on the target branch for pull request events and the previous commit of the current branch for push events."
|
||||||
|
required: true
|
||||||
|
default: "false"
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
added_files:
|
added_files:
|
||||||
@@ -173,6 +177,7 @@ runs:
|
|||||||
INPUT_UNTIL: ${{ inputs.until }}
|
INPUT_UNTIL: ${{ inputs.until }}
|
||||||
INPUT_PATH: ${{ inputs.path }}
|
INPUT_PATH: ${{ inputs.path }}
|
||||||
INPUT_FETCH_DEPTH: ${{ inputs.fetch_depth }}
|
INPUT_FETCH_DEPTH: ${{ inputs.fetch_depth }}
|
||||||
|
INPUT_SINCE_LAST_REMOTE_COMMIT: ${{ inputs.since_last_remote_commit }}
|
||||||
- name: Glob match
|
- name: Glob match
|
||||||
uses: tj-actions/glob@v15
|
uses: tj-actions/glob@v15
|
||||||
id: glob
|
id: glob
|
||||||
|
|||||||
76
diff-sha.sh
76
diff-sha.sh
@@ -4,6 +4,11 @@ set -euo pipefail
|
|||||||
|
|
||||||
INITIAL_COMMIT="false"
|
INITIAL_COMMIT="false"
|
||||||
GITHUB_OUTPUT=${GITHUB_OUTPUT:-""}
|
GITHUB_OUTPUT=${GITHUB_OUTPUT:-""}
|
||||||
|
EXTRA_ARGS="--no-tags"
|
||||||
|
|
||||||
|
if [[ "$GITHUB_REF" == "refs/tags/"* ]]; then
|
||||||
|
EXTRA_ARGS=""
|
||||||
|
fi
|
||||||
|
|
||||||
echo "::group::changed-files-diff-sha"
|
echo "::group::changed-files-diff-sha"
|
||||||
|
|
||||||
@@ -56,7 +61,8 @@ if [[ -z $GITHUB_BASE_REF ]]; then
|
|||||||
if [[ -z $INPUT_SHA ]]; then
|
if [[ -z $INPUT_SHA ]]; then
|
||||||
CURRENT_SHA=$(git rev-list -n 1 HEAD 2>&1) && exit_status=$? || exit_status=$?
|
CURRENT_SHA=$(git rev-list -n 1 HEAD 2>&1) && exit_status=$? || exit_status=$?
|
||||||
else
|
else
|
||||||
git fetch --no-tags -u --progress --deepen="$INPUT_FETCH_DEPTH"
|
# shellcheck disable=SC2086
|
||||||
|
git fetch $EXTRA_ARGS -u --progress --deepen="$INPUT_FETCH_DEPTH"
|
||||||
CURRENT_SHA=$INPUT_SHA; exit_status=$?
|
CURRENT_SHA=$INPUT_SHA; exit_status=$?
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@@ -82,12 +88,20 @@ if [[ -z $GITHUB_BASE_REF ]]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
PREVIOUS_SHA=$(git rev-list -n 1 "$TARGET_BRANCH" 2>&1) && exit_status=$? || exit_status=$?
|
if [[ "$INPUT_SINCE_LAST_REMOTE_COMMIT" == "true" ]]; then
|
||||||
|
PREVIOUS_SHA=""
|
||||||
if [[ -z "$PREVIOUS_SHA" ]]; then
|
|
||||||
if [[ "$GITHUB_EVENT_FORCED" == "false" || -z "$GITHUB_EVENT_FORCED" ]]; then
|
if [[ "$GITHUB_EVENT_FORCED" == "false" || -z "$GITHUB_EVENT_FORCED" ]]; then
|
||||||
PREVIOUS_SHA=$GITHUB_EVENT_BEFORE
|
PREVIOUS_SHA=$GITHUB_EVENT_BEFORE
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
PREVIOUS_SHA=$(git rev-list -n 1 "$TARGET_BRANCH" 2>&1) && exit_status=$? || exit_status=$?
|
||||||
|
|
||||||
|
if [[ -z "$PREVIOUS_SHA" ]]; then
|
||||||
|
if [[ "$GITHUB_EVENT_FORCED" == "false" || -z "$GITHUB_EVENT_FORCED" ]]; then
|
||||||
|
PREVIOUS_SHA=$GITHUB_EVENT_BEFORE
|
||||||
|
fi
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z "$PREVIOUS_SHA" || "$PREVIOUS_SHA" == "0000000000000000000000000000000000000000" ]]; then
|
if [[ -z "$PREVIOUS_SHA" || "$PREVIOUS_SHA" == "0000000000000000000000000000000000000000" ]]; then
|
||||||
@@ -110,7 +124,8 @@ if [[ -z $GITHUB_BASE_REF ]]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
git fetch --no-tags -u --progress --deepen="$INPUT_FETCH_DEPTH"
|
# shellcheck disable=SC2086
|
||||||
|
git fetch $EXTRA_ARGS -u --progress --deepen="$INPUT_FETCH_DEPTH"
|
||||||
PREVIOUS_SHA=$INPUT_BASE_SHA
|
PREVIOUS_SHA=$INPUT_BASE_SHA
|
||||||
TARGET_BRANCH=$(git name-rev --name-only "$PREVIOUS_SHA" 2>&1) && exit_status=$? || exit_status=$?
|
TARGET_BRANCH=$(git name-rev --name-only "$PREVIOUS_SHA" 2>&1) && exit_status=$? || exit_status=$?
|
||||||
CURRENT_BRANCH=$TARGET_BRANCH
|
CURRENT_BRANCH=$TARGET_BRANCH
|
||||||
@@ -133,21 +148,26 @@ else
|
|||||||
CURRENT_BRANCH=$GITHUB_HEAD_REF
|
CURRENT_BRANCH=$GITHUB_HEAD_REF
|
||||||
|
|
||||||
echo "Fetching remote refs..."
|
echo "Fetching remote refs..."
|
||||||
|
|
||||||
git fetch --depth="$INPUT_FETCH_DEPTH" origin +refs/heads/"$TARGET_BRANCH":refs/remotes/origin/"$TARGET_BRANCH"
|
|
||||||
git branch --track "$TARGET_BRANCH" origin/"$TARGET_BRANCH" 2>/dev/null || true
|
|
||||||
|
|
||||||
depth=$INPUT_FETCH_DEPTH
|
|
||||||
|
|
||||||
while [ -z "$( git merge-base "$TARGET_BRANCH" HEAD )" ]; do
|
if [[ "$INPUT_SINCE_LAST_REMOTE_COMMIT" == "false" ]]; then
|
||||||
git fetch --deepen="$depth" origin "$TARGET_BRANCH" HEAD;
|
# shellcheck disable=SC2086
|
||||||
depth=$((depth * 10))
|
git fetch $EXTRA_ARGS --depth="$INPUT_FETCH_DEPTH" origin +refs/heads/"$TARGET_BRANCH":refs/remotes/origin/"$TARGET_BRANCH"
|
||||||
max_depth=5000
|
git branch --track "$TARGET_BRANCH" origin/"$TARGET_BRANCH" 2>/dev/null || true
|
||||||
|
|
||||||
if [[ $depth -gt $max_depth ]]; then
|
depth=$INPUT_FETCH_DEPTH
|
||||||
echo "::error::Unable to find merge-base of $TARGET_BRANCH and HEAD."
|
|
||||||
fi
|
while [ -z "$( git merge-base "$TARGET_BRANCH" HEAD )" ]; do
|
||||||
done
|
# shellcheck disable=SC2086
|
||||||
|
git fetch $EXTRA_ARGS --deepen="$depth" origin "$TARGET_BRANCH" HEAD;
|
||||||
|
depth=$((depth * 10))
|
||||||
|
max_depth=5000
|
||||||
|
|
||||||
|
if [[ $depth -gt $max_depth ]]; then
|
||||||
|
echo "::error::Unable to find merge-base between $TARGET_BRANCH and HEAD."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
echo "::debug::Getting HEAD SHA..."
|
echo "::debug::Getting HEAD SHA..."
|
||||||
if [[ -n "$INPUT_UNTIL" ]]; then
|
if [[ -n "$INPUT_UNTIL" ]]; then
|
||||||
@@ -178,10 +198,24 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z $INPUT_BASE_SHA ]]; then
|
if [[ -z $INPUT_BASE_SHA ]]; then
|
||||||
PREVIOUS_SHA=$(git rev-list --no-merges -n 1 "$TARGET_BRANCH" 2>&1) && exit_status=$? || exit_status=$?
|
if [[ "$INPUT_SINCE_LAST_REMOTE_COMMIT" == "true" ]]; then
|
||||||
if [[ -z "$PREVIOUS_SHA" ]]; then
|
PREVIOUS_SHA=""
|
||||||
|
|
||||||
|
if [[ "$GITHUB_EVENT_FORCED" == "false" || -z "$GITHUB_EVENT_FORCED" ]]; then
|
||||||
|
PREVIOUS_SHA=$GITHUB_EVENT_BEFORE
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -z "$PREVIOUS_SHA" || "$PREVIOUS_SHA" == "0000000000000000000000000000000000000000" ]]; then
|
||||||
|
PREVIOUS_SHA=$(git rev-list -n 1 "$TARGET_BRANCH" 2>&1) && exit_status=$? || exit_status=$?
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
PREVIOUS_SHA=$(git rev-list -n 1 "$TARGET_BRANCH" 2>&1) && exit_status=$? || exit_status=$?
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -z "$PREVIOUS_SHA" || "$PREVIOUS_SHA" == "$CURRENT_SHA" ]]; then
|
||||||
PREVIOUS_SHA=$GITHUB_EVENT_PULL_REQUEST_BASE_SHA && exit_status=$? || exit_status=$?
|
PREVIOUS_SHA=$GITHUB_EVENT_PULL_REQUEST_BASE_SHA && exit_status=$? || exit_status=$?
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "::debug::Previous SHA: $PREVIOUS_SHA"
|
echo "::debug::Previous SHA: $PREVIOUS_SHA"
|
||||||
else
|
else
|
||||||
PREVIOUS_SHA=$INPUT_BASE_SHA && exit_status=$? || exit_status=$?
|
PREVIOUS_SHA=$INPUT_BASE_SHA && exit_status=$? || exit_status=$?
|
||||||
|
|||||||
Reference in New Issue
Block a user