Compare commits
60 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3ebdc42d8b | ||
|
|
747f9e656c | ||
|
|
9d429cc7ac | ||
|
|
b04424611d | ||
|
|
4f5723a9fe | ||
|
|
d362fea453 | ||
|
|
22ede94fe5 | ||
|
|
94e6fba8d8 | ||
|
|
61fb39f691 | ||
|
|
9478e36442 | ||
|
|
e6bd87aabe | ||
|
|
443b6c32e7 | ||
|
|
56a01f8a9e | ||
|
|
2e4e636392 | ||
|
|
c21087a6bb | ||
|
|
ac07453ae9 | ||
|
|
43835a2749 | ||
|
|
36f5714273 | ||
|
|
d48d7b71f5 | ||
|
|
b82208d0c1 | ||
|
|
9f7a99a9af | ||
|
|
a37f1b1575 | ||
|
|
3dbb79f467 | ||
|
|
44220f8c89 | ||
|
|
e43adb629b | ||
|
|
3c0e266bd5 | ||
|
|
67230d6de5 | ||
|
|
6a9cc33099 | ||
|
|
4b4f463907 | ||
|
|
991e8b3aae | ||
|
|
420a7792d0 | ||
|
|
e062ae86aa | ||
|
|
6326c61a70 | ||
|
|
eea929be22 | ||
|
|
9962dc418e | ||
|
|
77f03d2bb5 | ||
|
|
a236f54cc9 | ||
|
|
de6d1ed419 | ||
|
|
5345fb6b0e | ||
|
|
72d3bb8b33 | ||
|
|
d908ddd2ef | ||
|
|
8dc46ae460 | ||
|
|
1218e11f1e | ||
|
|
18ddeeb8bc | ||
|
|
3b614c0cfa | ||
|
|
5f89dc7d6e | ||
|
|
2d251d6924 | ||
|
|
c46761fdcd | ||
|
|
321490c60a | ||
|
|
dc88c3a0c5 | ||
|
|
2125c059c3 | ||
|
|
f6e319ef2e | ||
|
|
3d1f14f079 | ||
|
|
1abc7bec79 | ||
|
|
18dfe0dd4e | ||
|
|
c94657a1d8 | ||
|
|
c755692dde | ||
|
|
1e46f60599 | ||
|
|
f009ea4a47 | ||
|
|
7cdc68de58 |
5
.github/ISSUE_TEMPLATE/bug_report.yaml
vendored
5
.github/ISSUE_TEMPLATE/bug_report.yaml
vendored
@@ -69,13 +69,14 @@ body:
|
|||||||
id: logs
|
id: logs
|
||||||
attributes:
|
attributes:
|
||||||
label: Relevant log output
|
label: Relevant log output
|
||||||
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
|
description: Please copy and paste any relevant log output which is obtained after enabling debug logging. This will be automatically formatted into code, so no need for backticks.
|
||||||
placeholder: |
|
placeholder: |
|
||||||
This can be achieved by:
|
|
||||||
1. Re-running the workflow with debug logging enabled.
|
1. Re-running the workflow with debug logging enabled.
|
||||||
2. Copy or download the log archive.
|
2. Copy or download the log archive.
|
||||||
3. Paste the contents here or upload the file in a subsequent comment.
|
3. Paste the contents here or upload the file in a subsequent comment.
|
||||||
render: shell
|
render: shell
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
- type: textarea
|
- type: textarea
|
||||||
attributes:
|
attributes:
|
||||||
label: Anything else?
|
label: Anything else?
|
||||||
|
|||||||
3
.github/workflows/sync-release-version.yml
vendored
3
.github/workflows/sync-release-version.yml
vendored
@@ -1,5 +1,8 @@
|
|||||||
name: Update release version.
|
name: Update release version.
|
||||||
on:
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- '**'
|
||||||
release:
|
release:
|
||||||
types: [published]
|
types: [published]
|
||||||
|
|
||||||
|
|||||||
24
.github/workflows/test.yml
vendored
24
.github/workflows/test.yml
vendored
@@ -33,7 +33,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.platform }}
|
runs-on: ${{ matrix.platform }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
max-parallel: 4
|
max-parallel: 2
|
||||||
matrix:
|
matrix:
|
||||||
platform: [ubuntu-latest, ubuntu-22.04, windows-latest, macos-latest, macos-11, ubuntu-18.04, windows-2022]
|
platform: [ubuntu-latest, ubuntu-22.04, windows-latest, macos-latest, macos-11, ubuntu-18.04, windows-2022]
|
||||||
steps:
|
steps:
|
||||||
@@ -90,7 +90,7 @@ jobs:
|
|||||||
if: github.event_name == 'push'
|
if: github.event_name == 'push'
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
max-parallel: 4
|
max-parallel: 2
|
||||||
matrix:
|
matrix:
|
||||||
platform: [ubuntu-latest, ubuntu-22.04, windows-latest, macos-latest, macos-11, ubuntu-18.04, windows-2022]
|
platform: [ubuntu-latest, ubuntu-22.04, windows-latest, macos-latest, macos-11, ubuntu-18.04, windows-2022]
|
||||||
|
|
||||||
@@ -127,9 +127,9 @@ jobs:
|
|||||||
until: "2022-08-20"
|
until: "2022-08-20"
|
||||||
|
|
||||||
- name: Check output
|
- name: Check output
|
||||||
if: "!contains(steps.changed-files-until.outputs.all_changed_files, 'entrypoint.sh')"
|
if: "!contains(steps.changed-files-until.outputs.all_changed_files, 'README.md')"
|
||||||
run: |
|
run: |
|
||||||
echo "Invalid output: Expected to include (entrypoint.sh) got (${{ steps.changed-files-until.outputs.all_changed_files }})"
|
echo "Invalid output: Expected to include (README.md) got (${{ steps.changed-files-until.outputs.all_changed_files }})"
|
||||||
exit 1
|
exit 1
|
||||||
shell:
|
shell:
|
||||||
bash
|
bash
|
||||||
@@ -299,7 +299,7 @@ jobs:
|
|||||||
uses: ./
|
uses: ./
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
with:
|
with:
|
||||||
base_sha: "4554456"
|
sha: "4774456"
|
||||||
|
|
||||||
- name: Show output
|
- name: Show output
|
||||||
run: |
|
run: |
|
||||||
@@ -319,7 +319,7 @@ jobs:
|
|||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
with:
|
with:
|
||||||
files: action.yml
|
files: action.yml
|
||||||
base_sha: "4554456"
|
sha: "4774456"
|
||||||
|
|
||||||
- name: Show output
|
- name: Show output
|
||||||
run: |
|
run: |
|
||||||
@@ -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 }}
|
||||||
|
|||||||
146
HISTORY.md
146
HISTORY.md
@@ -1,12 +1,108 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [v34.4.0](https://github.com/tj-actions/changed-files/tree/v34.4.0) (2022-11-11)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v34...v34.4.0)
|
||||||
|
|
||||||
|
## [v34](https://github.com/tj-actions/changed-files/tree/v34) (2022-11-11)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v34.3.4...v34)
|
||||||
|
|
||||||
|
**Fixed bugs:**
|
||||||
|
|
||||||
|
- \[BUG\] Very simple branch gives: "Unable to find merge-base between main and HEAD." [\#797](https://github.com/tj-actions/changed-files/issues/797)
|
||||||
|
- \[BUG\] Specfic File Bug in v33 / v34 - grep: : No such file or directory [\#795](https://github.com/tj-actions/changed-files/issues/795)
|
||||||
|
- \[BUG\] Please verify that the previous sha is valid, and increase the fetch\_depth to a number higher than 40. [\#790](https://github.com/tj-actions/changed-files/issues/790)
|
||||||
|
|
||||||
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
- chore: update test [\#799](https://github.com/tj-actions/changed-files/pull/799) ([jackton1](https://github.com/jackton1))
|
||||||
|
- feat: skip merge-base check for non shallow clones and fallback to using --fork-point [\#798](https://github.com/tj-actions/changed-files/pull/798) ([jackton1](https://github.com/jackton1))
|
||||||
|
- chore: update bug issue template [\#796](https://github.com/tj-actions/changed-files/pull/796) ([jackton1](https://github.com/jackton1))
|
||||||
|
- Upgraded to v34.3.4 [\#794](https://github.com/tj-actions/changed-files/pull/794) ([jackton1](https://github.com/jackton1))
|
||||||
|
- chore: update readme [\#793](https://github.com/tj-actions/changed-files/pull/793) ([jackton1](https://github.com/jackton1))
|
||||||
|
|
||||||
|
## [v34.3.4](https://github.com/tj-actions/changed-files/tree/v34.3.4) (2022-11-08)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v34.3.3...v34.3.4)
|
||||||
|
|
||||||
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
- Updated README.md [\#792](https://github.com/tj-actions/changed-files/pull/792) ([jackton1](https://github.com/jackton1))
|
||||||
|
- fix: re-add ability to change the max fetch depth [\#791](https://github.com/tj-actions/changed-files/pull/791) ([jackton1](https://github.com/jackton1))
|
||||||
|
- Upgraded to v34.3.3 [\#788](https://github.com/tj-actions/changed-files/pull/788) ([jackton1](https://github.com/jackton1))
|
||||||
|
|
||||||
|
## [v34.3.3](https://github.com/tj-actions/changed-files/tree/v34.3.3) (2022-11-08)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v34.3.1...v34.3.3)
|
||||||
|
|
||||||
|
**Fixed bugs:**
|
||||||
|
|
||||||
|
- \[BUG\] Action compares only two latest commits on push [\#783](https://github.com/tj-actions/changed-files/issues/783)
|
||||||
|
- Detected dubious ownership in repository error when running the action [\#782](https://github.com/tj-actions/changed-files/issues/782)
|
||||||
|
|
||||||
|
**Closed issues:**
|
||||||
|
|
||||||
|
- Dependency Dashboard [\#27](https://github.com/tj-actions/changed-files/issues/27)
|
||||||
|
|
||||||
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
- fix: bug with force pushing commits to pr branches [\#787](https://github.com/tj-actions/changed-files/pull/787) ([jackton1](https://github.com/jackton1))
|
||||||
|
- fix: bug with invalid branch name [\#786](https://github.com/tj-actions/changed-files/pull/786) ([jackton1](https://github.com/jackton1))
|
||||||
|
- chore\(deps\): update tj-actions/glob action to v16 [\#785](https://github.com/tj-actions/changed-files/pull/785) ([renovate[bot]](https://github.com/apps/renovate))
|
||||||
|
- chore: update readme [\#784](https://github.com/tj-actions/changed-files/pull/784) ([jackton1](https://github.com/jackton1))
|
||||||
|
- Upgraded to v34.3.2 [\#781](https://github.com/tj-actions/changed-files/pull/781) ([jackton1](https://github.com/jackton1))
|
||||||
|
|
||||||
|
## [v34.3.1](https://github.com/tj-actions/changed-files/tree/v34.3.1) (2022-11-07)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v34.3.2...v34.3.1)
|
||||||
|
|
||||||
|
## [v34.3.2](https://github.com/tj-actions/changed-files/tree/v34.3.2) (2022-11-07)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v34.3.0...v34.3.2)
|
||||||
|
|
||||||
|
**Fixed bugs:**
|
||||||
|
|
||||||
|
- \[BUG\] Similar commit hashes detected: previous sha: abc123 is equivalent to the current sha: abc123 on PR merge [\#778](https://github.com/tj-actions/changed-files/issues/778)
|
||||||
|
|
||||||
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
- fix: similar commit hashes [\#780](https://github.com/tj-actions/changed-files/pull/780) ([jackton1](https://github.com/jackton1))
|
||||||
|
- chore: update readme [\#779](https://github.com/tj-actions/changed-files/pull/779) ([jackton1](https://github.com/jackton1))
|
||||||
|
- Upgraded to v34.3.0 [\#777](https://github.com/tj-actions/changed-files/pull/777) ([jackton1](https://github.com/jackton1))
|
||||||
|
|
||||||
|
## [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.2.2...v34.3.0)
|
||||||
|
|
||||||
|
**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)
|
## [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...v34.2.1)
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v34.2.0...v34.2.1)
|
||||||
|
|
||||||
## [v34](https://github.com/tj-actions/changed-files/tree/v34) (2022-11-05)
|
|
||||||
|
|
||||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v34.2.0...v34)
|
|
||||||
|
|
||||||
**Merged pull requests:**
|
**Merged pull requests:**
|
||||||
|
|
||||||
@@ -124,10 +220,6 @@
|
|||||||
|
|
||||||
- \[BUG\] Auto-Merge not working properly on Change-Detection for PRs [\#713](https://github.com/tj-actions/changed-files/issues/713)
|
- \[BUG\] Auto-Merge not working properly on Change-Detection for PRs [\#713](https://github.com/tj-actions/changed-files/issues/713)
|
||||||
|
|
||||||
**Closed issues:**
|
|
||||||
|
|
||||||
- Dependency Dashboard [\#27](https://github.com/tj-actions/changed-files/issues/27)
|
|
||||||
|
|
||||||
**Merged pull requests:**
|
**Merged pull requests:**
|
||||||
|
|
||||||
- Updated README.md [\#725](https://github.com/tj-actions/changed-files/pull/725) ([jackton1](https://github.com/jackton1))
|
- Updated README.md [\#725](https://github.com/tj-actions/changed-files/pull/725) ([jackton1](https://github.com/jackton1))
|
||||||
@@ -145,7 +237,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...v34.0.0)
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v33.0.0...v34.0.0)
|
||||||
|
|
||||||
**Fixed bugs:**
|
**Fixed bugs:**
|
||||||
|
|
||||||
@@ -158,13 +250,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](https://github.com/tj-actions/changed-files/tree/v33) (2022-10-21)
|
|
||||||
|
|
||||||
[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)
|
## [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)
|
[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)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v32.1.2...v33)
|
||||||
|
|
||||||
**Closed issues:**
|
**Closed issues:**
|
||||||
|
|
||||||
@@ -1202,7 +1294,7 @@
|
|||||||
|
|
||||||
## [v13](https://github.com/tj-actions/changed-files/tree/v13) (2022-02-17)
|
## [v13](https://github.com/tj-actions/changed-files/tree/v13) (2022-02-17)
|
||||||
|
|
||||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v2.0.1...v13)
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v12.2...v13)
|
||||||
|
|
||||||
**Implemented enhancements:**
|
**Implemented enhancements:**
|
||||||
|
|
||||||
@@ -1221,13 +1313,13 @@
|
|||||||
- \[BUG\] wrong result of any\_change output [\#314](https://github.com/tj-actions/changed-files/issues/314)
|
- \[BUG\] wrong result of any\_change output [\#314](https://github.com/tj-actions/changed-files/issues/314)
|
||||||
- \[BUG\] Investigate possible bug using since\_last\_remote\_commit when force pushing changes. [\#303](https://github.com/tj-actions/changed-files/issues/303)
|
- \[BUG\] Investigate possible bug using since\_last\_remote\_commit when force pushing changes. [\#303](https://github.com/tj-actions/changed-files/issues/303)
|
||||||
|
|
||||||
## [v2.0.1](https://github.com/tj-actions/changed-files/tree/v2.0.1) (2021-12-30)
|
|
||||||
|
|
||||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v12.2...v2.0.1)
|
|
||||||
|
|
||||||
## [v12.2](https://github.com/tj-actions/changed-files/tree/v12.2) (2021-12-30)
|
## [v12.2](https://github.com/tj-actions/changed-files/tree/v12.2) (2021-12-30)
|
||||||
|
|
||||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v12.1...v12.2)
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v2.0.1...v12.2)
|
||||||
|
|
||||||
|
## [v2.0.1](https://github.com/tj-actions/changed-files/tree/v2.0.1) (2021-12-30)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v12.1...v2.0.1)
|
||||||
|
|
||||||
**Merged pull requests:**
|
**Merged pull requests:**
|
||||||
|
|
||||||
@@ -1786,7 +1878,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.3...v7)
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v6...v7)
|
||||||
|
|
||||||
**Closed issues:**
|
**Closed issues:**
|
||||||
|
|
||||||
@@ -1802,13 +1894,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.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...v6.3)
|
|
||||||
|
|
||||||
## [v6](https://github.com/tj-actions/changed-files/tree/v6) (2021-05-26)
|
## [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)
|
[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)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v6.2...v6.3)
|
||||||
|
|
||||||
**Merged pull requests:**
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
|||||||
53
README.md
53
README.md
@@ -52,9 +52,13 @@ Retrieve all changed files and directories relative to the target branch or the
|
|||||||
name: CI
|
name: CI
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
# Compare the preceeding commit of main -> to the current commit of the main branch.
|
||||||
|
# (Note: To compare changes between the last pushed commit to the remote main branch set `since_last_remote_commit: true`)
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
# Compare the last commit of main -> to the current commit of a PR branch.
|
||||||
|
# (Note: To compare changes between the last pushed commit to the remote PR branch set `since_last_remote_commit: true`)
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
@@ -153,28 +157,30 @@ 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. |
|
| max\_fetch\_depth | string | false | `"5000"` | Maximum depth of the branch<br>history fetched. **NOTE**: This can<br>be adjusted to resolve errors<br>with insufficient history. |
|
||||||
| old\_new\_separator | string | false | `","` | Split character for old and<br>new filename pairs. |
|
| old\_new\_files\_separator | string | false | `" "` | Split character for multiple old<br>and new filename pairs. |
|
||||||
| path | string | false | `"."` | Specify a relative path under<br>`$GITHUB_WORKSPACE` to locate the repository.<br> |
|
| old\_new\_separator | string | false | `","` | Split character for old and<br>new filename pairs. |
|
||||||
| 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` |
|
| path | string | false | `"."` | Specify a relative path under<br>`$GITHUB_WORKSPACE` to locate the repository.<br> |
|
||||||
| separator | string | false | `" "` | Split character for output strings<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` |
|
||||||
| sha | string | false | `"${{ github.sha }}"` | Specify a different commit SHA<br>used for comparing changes |
|
| separator | string | false | `" "` | Split character for output strings<br> |
|
||||||
| since | string | false | | Get changed files for commits<br>whose timestamp is older than<br>the given time. |
|
| sha | string | false | `"${{ github.sha }}"` | Specify a different commit SHA<br>used for comparing changes |
|
||||||
| until | string | false | | Get changed files for commits<br>whose timestamp is earlier than<br>the given time. |
|
| since | string | false | | Get changed files for commits<br>whose timestamp is older 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 -->
|
||||||
|
|
||||||
@@ -594,6 +600,7 @@ 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)
|
||||||
@@ -605,7 +612,7 @@ Report bugs at https://github.com/tj-actions/changed-files/issues.
|
|||||||
If you are reporting a bug, please include:
|
If you are reporting a bug, please include:
|
||||||
|
|
||||||
* Your operating system name and version.
|
* Your operating system name and version.
|
||||||
* Any details about your workflow that might be helpful in troubleshooting.
|
* Any details about your workflow that might be helpful in troubleshooting. (**NOTE**: Ensure that you include full log outputs with debugging enabled)
|
||||||
* Detailed steps to reproduce the bug.
|
* Detailed steps to reproduce the bug.
|
||||||
|
|
||||||
## Contributors ✨
|
## Contributors ✨
|
||||||
|
|||||||
12
action.yml
12
action.yml
@@ -81,6 +81,14 @@ 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"
|
||||||
|
max_fetch_depth:
|
||||||
|
description: "Maximum depth of the branch history fetched. **NOTE**: This can be adjusted to resolve errors with insufficient history."
|
||||||
|
required: false
|
||||||
|
default: "5000"
|
||||||
|
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,8 +181,10 @@ 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_MAX_FETCH_DEPTH: ${{ inputs.max_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@v16
|
||||||
id: glob
|
id: glob
|
||||||
with:
|
with:
|
||||||
files: ${{ inputs.files }}
|
files: ${{ inputs.files }}
|
||||||
|
|||||||
90
diff-sha.sh
90
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"
|
||||||
|
|
||||||
@@ -40,8 +45,6 @@ fi
|
|||||||
|
|
||||||
if [[ -z $GITHUB_BASE_REF ]]; then
|
if [[ -z $GITHUB_BASE_REF ]]; then
|
||||||
echo "Running on a push event..."
|
echo "Running on a push event..."
|
||||||
TARGET_BRANCH=${GITHUB_REF/refs\/heads\//} && exit_status=$? || exit_status=$?
|
|
||||||
CURRENT_BRANCH=$TARGET_BRANCH && exit_status=$? || exit_status=$?
|
|
||||||
|
|
||||||
echo "::debug::Getting HEAD SHA..."
|
echo "::debug::Getting HEAD SHA..."
|
||||||
if [[ -n "$INPUT_UNTIL" ]]; then
|
if [[ -n "$INPUT_UNTIL" ]]; then
|
||||||
@@ -56,11 +59,15 @@ 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
|
||||||
|
|
||||||
|
TARGET_BRANCH=$(git name-rev --name-only "$CURRENT_SHA" 2>&1) && exit_status=$? || exit_status=$?
|
||||||
|
CURRENT_BRANCH=$TARGET_BRANCH && exit_status=$? || exit_status=$?
|
||||||
|
|
||||||
echo "::debug::Verifying the current commit SHA: $CURRENT_SHA"
|
echo "::debug::Verifying the current commit SHA: $CURRENT_SHA"
|
||||||
git rev-parse --quiet --verify "$CURRENT_SHA^{commit}" 1>/dev/null 2>&1 && exit_status=$? || exit_status=$?
|
git rev-parse --quiet --verify "$CURRENT_SHA^{commit}" 1>/dev/null 2>&1 && exit_status=$? || exit_status=$?
|
||||||
|
|
||||||
@@ -82,12 +89,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,10 +125,9 @@ 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=$?
|
|
||||||
CURRENT_BRANCH=$TARGET_BRANCH
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "::debug::Target branch $TARGET_BRANCH..."
|
echo "::debug::Target branch $TARGET_BRANCH..."
|
||||||
@@ -133,21 +147,12 @@ 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 -u --progress $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
|
||||||
|
fi
|
||||||
if [[ $depth -gt $max_depth ]]; then
|
|
||||||
echo "::error::Unable to find merge-base between $TARGET_BRANCH and HEAD."
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "::debug::Getting HEAD SHA..."
|
echo "::debug::Getting HEAD SHA..."
|
||||||
if [[ -n "$INPUT_UNTIL" ]]; then
|
if [[ -n "$INPUT_UNTIL" ]]; then
|
||||||
@@ -178,10 +183,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=$GITHUB_EVENT_BEFORE
|
||||||
|
|
||||||
|
if ! git rev-parse --quiet --verify "$PREVIOUS_SHA^{commit}" 1>/dev/null 2>&1; then
|
||||||
|
PREVIOUS_SHA=$(git rev-list -n 1 "$TARGET_BRANCH" 2>&1) && exit_status=$? || exit_status=$?
|
||||||
|
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=$?
|
||||||
@@ -190,6 +209,27 @@ else
|
|||||||
echo "::debug::Target branch: $TARGET_BRANCH"
|
echo "::debug::Target branch: $TARGET_BRANCH"
|
||||||
echo "::debug::Current branch: $CURRENT_BRANCH"
|
echo "::debug::Current branch: $CURRENT_BRANCH"
|
||||||
|
|
||||||
|
if [[ "$INPUT_SINCE_LAST_REMOTE_COMMIT" == "false" ]]; then
|
||||||
|
if [[ -f .git/shallow ]]; then
|
||||||
|
depth=$INPUT_FETCH_DEPTH
|
||||||
|
max_depth=$INPUT_MAX_FETCH_DEPTH
|
||||||
|
|
||||||
|
while [ -z "$( git merge-base --fork-point "$TARGET_BRANCH" "$CURRENT_SHA" )" ] || [ -z "$(git merge-base "$TARGET_BRANCH" "$CURRENT_SHA")" ] || [ -z "$(git diff --name-only --ignore-submodules=all "$PREVIOUS_SHA"..."$CURRENT_SHA" | head -1)" ]; do
|
||||||
|
depth=$((depth + 300))
|
||||||
|
|
||||||
|
# shellcheck disable=SC2086
|
||||||
|
git fetch $EXTRA_ARGS --deepen="$depth" origin "$TARGET_BRANCH" HEAD;
|
||||||
|
|
||||||
|
if [[ $depth -gt $max_depth ]]; then
|
||||||
|
echo "::error::Unable to locate a common ancestor between $TARGET_BRANCH and HEAD"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
else
|
||||||
|
echo "::debug::Not a shallow clone, skipping merge-base check."
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
echo "::debug::Verifying the previous commit SHA: $PREVIOUS_SHA"
|
echo "::debug::Verifying the previous commit SHA: $PREVIOUS_SHA"
|
||||||
git rev-parse --quiet --verify "$PREVIOUS_SHA^{commit}" 1>/dev/null 2>&1 && exit_status=$? || exit_status=$?
|
git rev-parse --quiet --verify "$PREVIOUS_SHA^{commit}" 1>/dev/null 2>&1 && exit_status=$? || exit_status=$?
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user