Compare commits
72 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1d6e210c97 | ||
|
|
f36f89daeb | ||
|
|
210f4edecf | ||
|
|
a558487ee0 | ||
|
|
b45fdcf650 | ||
|
|
baf172ed6a | ||
|
|
e64110acb1 | ||
|
|
d8ae75228d | ||
|
|
61ed208946 | ||
|
|
4f38efcb15 | ||
|
|
62c6729ad3 | ||
|
|
fd0ee42a4d | ||
|
|
d46fe4c5c6 | ||
|
|
307e695c51 | ||
|
|
b3d763dd5c | ||
|
|
f0555f4cd6 | ||
|
|
8953e851a1 | ||
|
|
09ae9e21b6 | ||
|
|
982d4d0dea | ||
|
|
724c3d91d5 | ||
|
|
759895012f | ||
|
|
48f056c336 | ||
|
|
7e7cfb8175 | ||
|
|
d8275c3c60 | ||
|
|
7c854716df | ||
|
|
efc6ca5073 | ||
|
|
ff1033d6d9 | ||
|
|
8de562e931 | ||
|
|
291d397b90 | ||
|
|
1ced186070 | ||
|
|
dd9210256d | ||
|
|
846166ffa0 | ||
|
|
4e8b0a81f6 | ||
|
|
be3cb7b5aa | ||
|
|
81520789a6 | ||
|
|
bea18ddafc | ||
|
|
b14b0a186c | ||
|
|
8c6e3fef17 | ||
|
|
62690928c6 | ||
|
|
ec96351509 | ||
|
|
5c8fbbaf20 | ||
|
|
bc00134c62 | ||
|
|
7ed7f59ca2 | ||
|
|
5cd49f8c2d | ||
|
|
2740f4ff1f | ||
|
|
5b1a2fe1bf | ||
|
|
a0f6ff42fa | ||
|
|
316681cafb | ||
|
|
6d2a5c29e8 | ||
|
|
3750c5302c | ||
|
|
a299058164 | ||
|
|
235f02844b | ||
|
|
a866c7c45e | ||
|
|
c8b8b3cadf | ||
|
|
2610be7bb8 | ||
|
|
7c640bd299 | ||
|
|
0604c7fd87 | ||
|
|
e4574f5e38 | ||
|
|
2e272d0ec7 | ||
|
|
270645280a | ||
|
|
a8b258a5a2 | ||
|
|
d3148ec5e5 | ||
|
|
0190fb3dbc | ||
|
|
f0f52523e7 | ||
|
|
9461844917 | ||
|
|
03730a35b9 | ||
|
|
bfda1ec9d1 | ||
|
|
17ab284b9d | ||
|
|
f51c3c4c5f | ||
|
|
c742851bbf | ||
|
|
9f56ba29e4 | ||
|
|
10a315a997 |
@@ -132,6 +132,24 @@
|
|||||||
"contributions": [
|
"contributions": [
|
||||||
"code"
|
"code"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"login": "kostiantyn-korniienko-aurea",
|
||||||
|
"name": "Kostiantyn Korniienko",
|
||||||
|
"avatar_url": "https://avatars.githubusercontent.com/u/37180625?v=4",
|
||||||
|
"profile": "https://github.com/kostiantyn-korniienko-aurea",
|
||||||
|
"contributions": [
|
||||||
|
"doc"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"login": "lpulley",
|
||||||
|
"name": "Logan Pulley",
|
||||||
|
"avatar_url": "https://avatars.githubusercontent.com/u/7193187?v=4",
|
||||||
|
"profile": "https://github.com/lpulley",
|
||||||
|
"contributions": [
|
||||||
|
"code"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"contributorsPerLine": 7,
|
"contributorsPerLine": 7,
|
||||||
@@ -139,5 +157,6 @@
|
|||||||
"projectOwner": "tj-actions",
|
"projectOwner": "tj-actions",
|
||||||
"repoType": "github",
|
"repoType": "github",
|
||||||
"repoHost": "https://github.com",
|
"repoHost": "https://github.com",
|
||||||
"skipCi": true
|
"skipCi": true,
|
||||||
|
"commitConvention": "angular"
|
||||||
}
|
}
|
||||||
|
|||||||
10
.github/workflows/greetings.yml
vendored
10
.github/workflows/greetings.yml
vendored
@@ -6,8 +6,8 @@ jobs:
|
|||||||
greeting:
|
greeting:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/first-interaction@v1.1.0
|
- uses: actions/first-interaction@v1
|
||||||
with:
|
with:
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
issue-message: "Thanks for reporting this issue, don't forget to star this project if you haven't already to help us reach a wider audience."
|
issue-message: "Thanks for reporting this issue, don't forget to star this project if you haven't already to help us reach a wider audience."
|
||||||
pr-message: "Thanks for implementing a fix, could you ensure that the test covers your changes if applicable."
|
pr-message: "Thanks for implementing a fix, could you ensure that the test covers your changes if applicable."
|
||||||
|
|||||||
2
.github/workflows/manual-matrix-test.yml
vendored
2
.github/workflows/manual-matrix-test.yml
vendored
@@ -24,7 +24,7 @@ jobs:
|
|||||||
echo '${{ steps.changed-files.outputs.all_changed_files }}'
|
echo '${{ steps.changed-files.outputs.all_changed_files }}'
|
||||||
|
|
||||||
- id: set-matrix
|
- id: set-matrix
|
||||||
run: echo "::set-output name=matrix::{\"container\":${{ steps.changed-files.outputs.all_changed_files }}}"
|
run: echo "matrix={\"container\":${{ steps.changed-files.outputs.all_changed_files }}}" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
matrix-job:
|
matrix-job:
|
||||||
name: Run Matrix Job
|
name: Run Matrix Job
|
||||||
|
|||||||
112
.github/workflows/test.yml
vendored
112
.github/workflows/test.yml
vendored
@@ -84,6 +84,62 @@ jobs:
|
|||||||
shell:
|
shell:
|
||||||
bash
|
bash
|
||||||
|
|
||||||
|
test-using-since-and-until:
|
||||||
|
name: Test changed-files using since and until
|
||||||
|
runs-on: ${{ matrix.platform }}
|
||||||
|
if: github.event_name == 'push'
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
max-parallel: 4
|
||||||
|
matrix:
|
||||||
|
platform: [ubuntu-latest, ubuntu-22.04, windows-latest, macos-latest, macos-11, ubuntu-18.04, windows-2022]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout to branch
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Run changed-files since 2022-08-19
|
||||||
|
id: changed-files-since
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
since: "2022-08-19"
|
||||||
|
|
||||||
|
- name: Check output
|
||||||
|
if: "!contains(steps.changed-files-since.outputs.all_changed_files, '.github/workflows/sync-release-version.yml')"
|
||||||
|
run: |
|
||||||
|
echo "Invalid output: Expected to include (.github/workflows/sync-release-version.yml) got (${{ steps.changed-files-since.outputs.all_changed_files }})"
|
||||||
|
exit 1
|
||||||
|
shell:
|
||||||
|
bash
|
||||||
|
|
||||||
|
- name: Show output
|
||||||
|
run: |
|
||||||
|
echo '${{ toJSON(steps.changed-files-since.outputs) }}'
|
||||||
|
shell:
|
||||||
|
bash
|
||||||
|
|
||||||
|
- name: Run changed-files until 2022-08-20
|
||||||
|
id: changed-files-until
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
until: "2022-08-20"
|
||||||
|
|
||||||
|
- name: Check output
|
||||||
|
if: "!contains(steps.changed-files-until.outputs.all_changed_files, 'entrypoint.sh')"
|
||||||
|
run: |
|
||||||
|
echo "Invalid output: Expected to include (entrypoint.sh) got (${{ steps.changed-files-until.outputs.all_changed_files }})"
|
||||||
|
exit 1
|
||||||
|
shell:
|
||||||
|
bash
|
||||||
|
|
||||||
|
- name: Show output
|
||||||
|
run: |
|
||||||
|
echo '${{ toJSON(steps.changed-files-until.outputs) }}'
|
||||||
|
shell:
|
||||||
|
bash
|
||||||
|
|
||||||
test-similar-base-and-commit-sha:
|
test-similar-base-and-commit-sha:
|
||||||
name: Test changed-files similar base and commit sha
|
name: Test changed-files similar base and commit sha
|
||||||
runs-on: ${{ matrix.platform }}
|
runs-on: ${{ matrix.platform }}
|
||||||
@@ -119,6 +175,34 @@ jobs:
|
|||||||
shell:
|
shell:
|
||||||
bash
|
bash
|
||||||
|
|
||||||
|
test-unset-github-output-env:
|
||||||
|
name: Test unset GITHUB_OUTPUT env
|
||||||
|
runs-on: ${{ matrix.platform }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
max-parallel: 4
|
||||||
|
matrix:
|
||||||
|
platform: [ubuntu-latest, ubuntu-22.04, windows-latest, macos-latest, macos-11, ubuntu-18.04, windows-2022]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout to branch
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Run changed-files with unset GITHUB_OUTPUT env
|
||||||
|
id: changed-files
|
||||||
|
continue-on-error: true
|
||||||
|
uses: ./
|
||||||
|
env:
|
||||||
|
GITHUB_OUTPUT: ""
|
||||||
|
|
||||||
|
- name: Show output
|
||||||
|
run: |
|
||||||
|
echo '${{ toJSON(steps.changed-files.outputs) }}'
|
||||||
|
shell:
|
||||||
|
bash
|
||||||
|
|
||||||
test-single-commit-history:
|
test-single-commit-history:
|
||||||
name: Test changed-files single commit history
|
name: Test changed-files single commit history
|
||||||
runs-on: ${{ matrix.platform }}
|
runs-on: ${{ matrix.platform }}
|
||||||
@@ -138,12 +222,6 @@ jobs:
|
|||||||
id: changed-files
|
id: changed-files
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
uses: ./
|
uses: ./
|
||||||
|
|
||||||
- name: Exit with 1 if no error is raised
|
|
||||||
if: steps.changed-files.outcome != 'failure' && github.event.action == 'closed'
|
|
||||||
run: |
|
|
||||||
echo "Expected: (failure) got ${{ steps.changed-files.outcome }}"
|
|
||||||
exit 1
|
|
||||||
|
|
||||||
- name: Show output
|
- name: Show output
|
||||||
run: |
|
run: |
|
||||||
@@ -335,28 +413,6 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
shell:
|
shell:
|
||||||
bash
|
bash
|
||||||
- name: Run changed-files since 2022-08-19
|
|
||||||
id: changed-files-since
|
|
||||||
uses: ./
|
|
||||||
continue-on-error: true
|
|
||||||
with:
|
|
||||||
since: "2022-08-19"
|
|
||||||
- name: Show output
|
|
||||||
run: |
|
|
||||||
echo '${{ toJSON(steps.changed-files-since.outputs) }}'
|
|
||||||
shell:
|
|
||||||
bash
|
|
||||||
- name: Run changed-files until 2022-08-20
|
|
||||||
id: changed-files-until
|
|
||||||
uses: ./
|
|
||||||
continue-on-error: true
|
|
||||||
with:
|
|
||||||
until: "2022-08-20"
|
|
||||||
- name: Show output
|
|
||||||
run: |
|
|
||||||
echo '${{ toJSON(steps.changed-files-until.outputs) }}'
|
|
||||||
shell:
|
|
||||||
bash
|
|
||||||
- name: Run changed-files with forward slash separator
|
- name: Run changed-files with forward slash separator
|
||||||
id: changed-files-forward-slash
|
id: changed-files-forward-slash
|
||||||
uses: ./
|
uses: ./
|
||||||
|
|||||||
2
.github/workflows/update-readme.yml
vendored
2
.github/workflows/update-readme.yml
vendored
@@ -9,7 +9,7 @@ jobs:
|
|||||||
sync-assets:
|
sync-assets:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3.0.2
|
- uses: actions/checkout@v3.1.0
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
|
|||||||
133
HISTORY.md
133
HISTORY.md
@@ -1,12 +1,35 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
## [v31.0.2](https://github.com/tj-actions/changed-files/tree/v31.0.2) (2022-09-29)
|
## [Unreleased](https://github.com/tj-actions/changed-files/tree/HEAD)
|
||||||
|
|
||||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v31...v31.0.2)
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v32.1.1...HEAD)
|
||||||
|
|
||||||
## [v31](https://github.com/tj-actions/changed-files/tree/v31) (2022-09-29)
|
**Fixed bugs:**
|
||||||
|
|
||||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v31.0.1...v31)
|
- \[BUG\] Random GITHUB\_OUTPUT: unbound variable in get-sha.sh [\#690](https://github.com/tj-actions/changed-files/issues/690)
|
||||||
|
|
||||||
|
## [v32.1.1](https://github.com/tj-actions/changed-files/tree/v32.1.1) (2022-10-14)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v32...v32.1.1)
|
||||||
|
|
||||||
|
## [v32](https://github.com/tj-actions/changed-files/tree/v32) (2022-10-14)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v32.1.0...v32)
|
||||||
|
|
||||||
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
- feat: remove duplicate files add back support for deprecated set-output [\#691](https://github.com/tj-actions/changed-files/pull/691) ([jackton1](https://github.com/jackton1))
|
||||||
|
- Upgraded to v32.1.0 [\#687](https://github.com/tj-actions/changed-files/pull/687) ([jackton1](https://github.com/jackton1))
|
||||||
|
- Updated README.md [\#686](https://github.com/tj-actions/changed-files/pull/686) ([jackton1](https://github.com/jackton1))
|
||||||
|
|
||||||
|
## [v32.1.0](https://github.com/tj-actions/changed-files/tree/v32.1.0) (2022-10-12)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v32.0.1...v32.1.0)
|
||||||
|
|
||||||
|
**Fixed bugs:**
|
||||||
|
|
||||||
|
- \[BUG\] runner is reporting old Node.js version. [\#678](https://github.com/tj-actions/changed-files/issues/678)
|
||||||
|
- \[BUG\] New commits pushed to the base branch results in errors when shallow history is used. [\#668](https://github.com/tj-actions/changed-files/issues/668)
|
||||||
|
|
||||||
**Closed issues:**
|
**Closed issues:**
|
||||||
|
|
||||||
@@ -14,6 +37,71 @@
|
|||||||
|
|
||||||
**Merged pull requests:**
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
- docs: add lpulley as a contributor for code [\#685](https://github.com/tj-actions/changed-files/pull/685) ([allcontributors[bot]](https://github.com/apps/allcontributors))
|
||||||
|
- Updated README.md [\#684](https://github.com/tj-actions/changed-files/pull/684) ([jackton1](https://github.com/jackton1))
|
||||||
|
- chore: update test [\#683](https://github.com/tj-actions/changed-files/pull/683) ([jackton1](https://github.com/jackton1))
|
||||||
|
- Updated README.md [\#682](https://github.com/tj-actions/changed-files/pull/682) ([jackton1](https://github.com/jackton1))
|
||||||
|
- fix: bug with new commits pushed to the base branch that result in errors when shallow history is used [\#681](https://github.com/tj-actions/changed-files/pull/681) ([jackton1](https://github.com/jackton1))
|
||||||
|
- Upgraded to v32.0.1 [\#680](https://github.com/tj-actions/changed-files/pull/680) ([jackton1](https://github.com/jackton1))
|
||||||
|
- Use `>>$GITHUB_OUTPUT` instead of `::set-output` [\#679](https://github.com/tj-actions/changed-files/pull/679) ([lpulley](https://github.com/lpulley))
|
||||||
|
|
||||||
|
## [v32.0.1](https://github.com/tj-actions/changed-files/tree/v32.0.1) (2022-10-11)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v32.0.0...v32.0.1)
|
||||||
|
|
||||||
|
**Fixed bugs:**
|
||||||
|
|
||||||
|
- \[BUG\] file not ignored with files\_ignore option [\#675](https://github.com/tj-actions/changed-files/issues/675)
|
||||||
|
|
||||||
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
- chore\(deps\): update tj-actions/glob action to v15 [\#677](https://github.com/tj-actions/changed-files/pull/677) ([renovate[bot]](https://github.com/apps/renovate))
|
||||||
|
- Upgraded to v32.0.0 [\#676](https://github.com/tj-actions/changed-files/pull/676) ([jackton1](https://github.com/jackton1))
|
||||||
|
|
||||||
|
## [v32.0.0](https://github.com/tj-actions/changed-files/tree/v32.0.0) (2022-10-06)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v31...v32.0.0)
|
||||||
|
|
||||||
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
- Updated README.md [\#674](https://github.com/tj-actions/changed-files/pull/674) ([jackton1](https://github.com/jackton1))
|
||||||
|
- add kostiantyn-korniienko-aurea as a contributor for doc [\#673](https://github.com/tj-actions/changed-files/pull/673) ([allcontributors[bot]](https://github.com/apps/allcontributors))
|
||||||
|
- TYPO fix [\#671](https://github.com/tj-actions/changed-files/pull/671) ([kostiantyn-korniienko-aurea](https://github.com/kostiantyn-korniienko-aurea))
|
||||||
|
- chore\(deps\): update tj-actions/glob action to v14 [\#670](https://github.com/tj-actions/changed-files/pull/670) ([renovate[bot]](https://github.com/apps/renovate))
|
||||||
|
- chore\(deps\): update actions/checkout action to v3.1.0 [\#669](https://github.com/tj-actions/changed-files/pull/669) ([renovate[bot]](https://github.com/apps/renovate))
|
||||||
|
- Upgraded to v31.0.3 [\#667](https://github.com/tj-actions/changed-files/pull/667) ([jackton1](https://github.com/jackton1))
|
||||||
|
|
||||||
|
## [v31](https://github.com/tj-actions/changed-files/tree/v31) (2022-10-02)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v31.0.3...v31)
|
||||||
|
|
||||||
|
## [v31.0.3](https://github.com/tj-actions/changed-files/tree/v31.0.3) (2022-10-02)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v31.0.2...v31.0.3)
|
||||||
|
|
||||||
|
**Fixed bugs:**
|
||||||
|
|
||||||
|
- \[BUG\] I'd like to use file name consisting of Korean, not English [\#658](https://github.com/tj-actions/changed-files/issues/658)
|
||||||
|
- Relative path from a working directory [\#657](https://github.com/tj-actions/changed-files/issues/657)
|
||||||
|
- Similar commit hash detected. You seem to be missing fetch-depth:0 [\#656](https://github.com/tj-actions/changed-files/issues/656)
|
||||||
|
|
||||||
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
- chore: remove redundant since last remote commit input [\#666](https://github.com/tj-actions/changed-files/pull/666) ([jackton1](https://github.com/jackton1))
|
||||||
|
- chore: fixed test [\#665](https://github.com/tj-actions/changed-files/pull/665) ([jackton1](https://github.com/jackton1))
|
||||||
|
- chore: update docs [\#664](https://github.com/tj-actions/changed-files/pull/664) ([jackton1](https://github.com/jackton1))
|
||||||
|
- chore: fix bug with base sha [\#663](https://github.com/tj-actions/changed-files/pull/663) ([jackton1](https://github.com/jackton1))
|
||||||
|
- chore: dump github context [\#662](https://github.com/tj-actions/changed-files/pull/662) ([jackton1](https://github.com/jackton1))
|
||||||
|
- fix: error retrieving the base sha [\#661](https://github.com/tj-actions/changed-files/pull/661) ([jackton1](https://github.com/jackton1))
|
||||||
|
- chore: test using non ascii characters in files input [\#659](https://github.com/tj-actions/changed-files/pull/659) ([jackton1](https://github.com/jackton1))
|
||||||
|
- Upgraded to v31.0.2 [\#655](https://github.com/tj-actions/changed-files/pull/655) ([jackton1](https://github.com/jackton1))
|
||||||
|
|
||||||
|
## [v31.0.2](https://github.com/tj-actions/changed-files/tree/v31.0.2) (2022-09-29)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v31.0.1...v31.0.2)
|
||||||
|
|
||||||
|
**Merged pull requests:**
|
||||||
|
|
||||||
- chore: add back ability to fetch target branch history [\#654](https://github.com/tj-actions/changed-files/pull/654) ([jackton1](https://github.com/jackton1))
|
- chore: add back ability to fetch target branch history [\#654](https://github.com/tj-actions/changed-files/pull/654) ([jackton1](https://github.com/jackton1))
|
||||||
- chore\(deps\): update peter-evans/create-pull-request action to v4.1.3 [\#653](https://github.com/tj-actions/changed-files/pull/653) ([renovate[bot]](https://github.com/apps/renovate))
|
- chore\(deps\): update peter-evans/create-pull-request action to v4.1.3 [\#653](https://github.com/tj-actions/changed-files/pull/653) ([renovate[bot]](https://github.com/apps/renovate))
|
||||||
- Upgraded to v31.0.1 [\#652](https://github.com/tj-actions/changed-files/pull/652) ([jackton1](https://github.com/jackton1))
|
- Upgraded to v31.0.1 [\#652](https://github.com/tj-actions/changed-files/pull/652) ([jackton1](https://github.com/jackton1))
|
||||||
@@ -48,7 +136,7 @@
|
|||||||
|
|
||||||
## [v30.0.0](https://github.com/tj-actions/changed-files/tree/v30.0.0) (2022-09-24)
|
## [v30.0.0](https://github.com/tj-actions/changed-files/tree/v30.0.0) (2022-09-24)
|
||||||
|
|
||||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v29...v30.0.0)
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v29.0.9...v30.0.0)
|
||||||
|
|
||||||
**Fixed bugs:**
|
**Fixed bugs:**
|
||||||
|
|
||||||
@@ -64,13 +152,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:**
|
||||||
|
|
||||||
@@ -1015,7 +1103,11 @@
|
|||||||
|
|
||||||
## [v11.9](https://github.com/tj-actions/changed-files/tree/v11.9) (2021-12-04)
|
## [v11.9](https://github.com/tj-actions/changed-files/tree/v11.9) (2021-12-04)
|
||||||
|
|
||||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v1.3.1...v11.9)
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v11...v11.9)
|
||||||
|
|
||||||
|
## [v11](https://github.com/tj-actions/changed-files/tree/v11) (2021-12-04)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v1.3.1...v11)
|
||||||
|
|
||||||
**Implemented enhancements:**
|
**Implemented enhancements:**
|
||||||
|
|
||||||
@@ -1176,7 +1268,12 @@
|
|||||||
|
|
||||||
## [v11.1](https://github.com/tj-actions/changed-files/tree/v11.1) (2021-10-25)
|
## [v11.1](https://github.com/tj-actions/changed-files/tree/v11.1) (2021-10-25)
|
||||||
|
|
||||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v11...v11.1)
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v10.1...v11.1)
|
||||||
|
|
||||||
|
**Fixed bugs:**
|
||||||
|
|
||||||
|
- \[BUG\] Spaces in file names are not handled correctly [\#216](https://github.com/tj-actions/changed-files/issues/216)
|
||||||
|
- \[BUG\] Usage of quotes around array items [\#208](https://github.com/tj-actions/changed-files/issues/208)
|
||||||
|
|
||||||
**Closed issues:**
|
**Closed issues:**
|
||||||
|
|
||||||
@@ -1187,18 +1284,6 @@
|
|||||||
- Disable automatic tag following [\#225](https://github.com/tj-actions/changed-files/pull/225) ([jackton1](https://github.com/jackton1))
|
- Disable automatic tag following [\#225](https://github.com/tj-actions/changed-files/pull/225) ([jackton1](https://github.com/jackton1))
|
||||||
- Updated README.md [\#223](https://github.com/tj-actions/changed-files/pull/223) ([jackton1](https://github.com/jackton1))
|
- Updated README.md [\#223](https://github.com/tj-actions/changed-files/pull/223) ([jackton1](https://github.com/jackton1))
|
||||||
- Upgraded to v11 [\#222](https://github.com/tj-actions/changed-files/pull/222) ([jackton1](https://github.com/jackton1))
|
- Upgraded to v11 [\#222](https://github.com/tj-actions/changed-files/pull/222) ([jackton1](https://github.com/jackton1))
|
||||||
|
|
||||||
## [v11](https://github.com/tj-actions/changed-files/tree/v11) (2021-10-23)
|
|
||||||
|
|
||||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v10.1...v11)
|
|
||||||
|
|
||||||
**Fixed bugs:**
|
|
||||||
|
|
||||||
- \[BUG\] Spaces in file names are not handled correctly [\#216](https://github.com/tj-actions/changed-files/issues/216)
|
|
||||||
- \[BUG\] Usage of quotes around array items [\#208](https://github.com/tj-actions/changed-files/issues/208)
|
|
||||||
|
|
||||||
**Merged pull requests:**
|
|
||||||
|
|
||||||
- Updated README.md [\#221](https://github.com/tj-actions/changed-files/pull/221) ([jackton1](https://github.com/jackton1))
|
- Updated README.md [\#221](https://github.com/tj-actions/changed-files/pull/221) ([jackton1](https://github.com/jackton1))
|
||||||
- Miscellaneous code cleanup [\#219](https://github.com/tj-actions/changed-files/pull/219) ([jackton1](https://github.com/jackton1))
|
- Miscellaneous code cleanup [\#219](https://github.com/tj-actions/changed-files/pull/219) ([jackton1](https://github.com/jackton1))
|
||||||
- Fixed bug with separator for filenames that contain spaces [\#218](https://github.com/tj-actions/changed-files/pull/218) ([jackton1](https://github.com/jackton1))
|
- Fixed bug with separator for filenames that contain spaces [\#218](https://github.com/tj-actions/changed-files/pull/218) ([jackton1](https://github.com/jackton1))
|
||||||
|
|||||||
169
README.md
169
README.md
@@ -7,13 +7,13 @@
|
|||||||
|
|
||||||
<!-- 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 -->
|
||||||
|
|
||||||
## changed-files
|
## changed-files
|
||||||
|
|
||||||
Retrieve all changed files and directories relative to the target branch (`pull_request*` based events) or the last remote commit (`push` or `pull_request*` based event) returning the **absolute path** to all changed files and directories from the project root.
|
Retrieve all changed files and directories relative to the target branch or the last remote commit returning the **absolute path** from the project root.
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
@@ -69,7 +69,7 @@ jobs:
|
|||||||
# Example 1
|
# Example 1
|
||||||
- name: Get changed files
|
- name: Get changed files
|
||||||
id: changed-files
|
id: changed-files
|
||||||
uses: tj-actions/changed-files@v31
|
uses: tj-actions/changed-files@v32
|
||||||
|
|
||||||
- name: List all changed files
|
- name: List all changed files
|
||||||
run: |
|
run: |
|
||||||
@@ -80,7 +80,7 @@ jobs:
|
|||||||
# Example 2
|
# Example 2
|
||||||
- name: Get changed files in the docs folder
|
- name: Get changed files in the docs folder
|
||||||
id: changed-files-specific
|
id: changed-files-specific
|
||||||
uses: tj-actions/changed-files@v31
|
uses: tj-actions/changed-files@v32
|
||||||
with:
|
with:
|
||||||
files: |
|
files: |
|
||||||
docs/**
|
docs/**
|
||||||
@@ -115,53 +115,54 @@ Support this project with a :star:
|
|||||||
| U | Unmerged |
|
| U | Unmerged |
|
||||||
| X | Unknown |
|
| X | Unknown |
|
||||||
|
|
||||||
| Output | type | example | description |
|
| Output | type | example | description |
|
||||||
|:----------------------------------:|:--------:|:--------------------------------------------------------------:|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
|
|:----------------------------------:|:--------:|:--------------------------------------------------------------:|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
|
||||||
| any\_changed | `string` | `true` OR `false` | Returns `true` when any <br /> of the filenames provided using <br /> the `files` input has changed. If no `files` have been specified,<br> an empty string `''` is returned. <br /> i.e. *using a combination of all added, <br />copied, modified and renamed files (ACMR)* |
|
| any\_changed | `string` | `true` OR `false` | Returns `true` when any <br /> of the filenames provided using <br /> the `files` input has changed. If no `files` have been specified,<br> an empty string `''` is returned. <br /> i.e. *using a combination of all added, <br />copied, modified and renamed files (ACMR)* |
|
||||||
| only\_changed | `string` | `true` OR `false` | Returns `true` when only <br /> files provided using <br /> the `files` input has changed. If no `files` have been specified,<br> an empty string `''` is returned. <br /> i.e. *using a combination of all added, <br />copied, modified and renamed files (ACMR)* |
|
| only\_changed | `string` | `true` OR `false` | Returns `true` when only <br /> files provided using <br /> the `files` input has changed. If no `files` have been specified,<br> an empty string `''` is returned. <br /> i.e. *using a combination of all added, <br />copied, modified and renamed files (ACMR)* |
|
||||||
| other\_changed\_files | `string` | `'new.txt path/to/file.png ...'` | Returns all other changed files <br/> not listed in the files input <br /> i.e. *using a combination of all added, <br />copied, modified and renamed files (ACMR)* |
|
| other\_changed\_files | `string` | `'new.txt path/to/file.png ...'` | Returns all other changed files <br/> not listed in the files input <br /> i.e. *using a combination of all added, <br />copied, modified and renamed files (ACMR)* |
|
||||||
| any\_modified | `string` | `true` OR `false` | Returns `true` when any <br /> of the filenames provided using <br /> the `files` input has been modified. If no `files` have been specified,<br> an empty string `''` is returned. <br /> i.e. *using a combination of all added, <br />copied, modified, renamed, and deleted files (ACMRD)* |
|
| any\_modified | `string` | `true` OR `false` | Returns `true` when any <br /> of the filenames provided using <br /> the `files` input has been modified. If no `files` have been specified,<br> an empty string `''` is returned. <br /> i.e. *using a combination of all added, <br />copied, modified, renamed, and deleted files (ACMRD)* |
|
||||||
| only\_modified | `string` | `true` OR `false` | Returns `true` when only <br /> files provided using <br /> the `files` input has been modified. If no `files` have been specified,<br> an empty string `''` is returned.(ACMRD) |
|
| only\_modified | `string` | `true` OR `false` | Returns `true` when only <br /> files provided using <br /> the `files` input has been modified. If no `files` have been specified,<br> an empty string `''` is returned.(ACMRD) |
|
||||||
| other\_modified\_files | `string` | `'new.txt path/to/file.png ...'` | Returns all other modified files <br/> not listed in the files input <br /> i.e. *a combination of all added, <br /> copied, modified, and deleted files (ACMRD)* |
|
| other\_modified\_files | `string` | `'new.txt path/to/file.png ...'` | Returns all other modified files <br/> not listed in the files input <br /> i.e. *a combination of all added, <br /> copied, modified, and deleted files (ACMRD)* |
|
||||||
| any\_deleted | `string` | `true` OR `false` | Returns `true` when any <br /> of the filenames provided using <br /> the `files` input has been deleted. If no `files` have been specified,<br> an empty string `''` is returned. (D) |
|
| any\_deleted | `string` | `true` OR `false` | Returns `true` when any <br /> of the filenames provided using <br /> the `files` input has been deleted. If no `files` have been specified,<br> an empty string `''` is returned. (D) |
|
||||||
| only\_deleted | `string` | `true` OR `false` | Returns `true` when only <br /> files provided using <br /> the `files` input has been deleted. If no `files` have been specified,<br> an empty string `''` is returned. (D) |
|
| only\_deleted | `string` | `true` OR `false` | Returns `true` when only <br /> files provided using <br /> the `files` input has been deleted. If no `files` have been specified,<br> an empty string `''` is returned. (D) |
|
||||||
| other\_deleted\_files | `string` | `'new.txt path/to/file.png ...'` | Returns all other deleted files <br/> not listed in the files input <br /> i.e. *a combination of all deleted files (D)* |
|
| other\_deleted\_files | `string` | `'new.txt path/to/file.png ...'` | Returns all other deleted files <br/> not listed in the files input <br /> i.e. *a combination of all deleted files (D)* |
|
||||||
| all\_changed\_files | `string` | `'new.txt path/to/file.png ...'` | Returns all changed files <br /> i.e. *a combination of all added, <br />copied, modified and renamed files (ACMR)* |
|
| all\_changed\_files | `string` | `'new.txt path/to/file.png ...'` | Returns all changed files <br /> i.e. *a combination of all added, <br />copied, modified and renamed files (ACMR)* |
|
||||||
| all\_modified\_files | `string` | `'new.txt path/to/file.png ...'` | Returns all changed files <br /> i.e. *a combination of all added, <br />copied, modified, renamed and deleted files (ACMRD)* |
|
| all\_modified\_files | `string` | `'new.txt path/to/file.png ...'` | Returns all changed files <br /> i.e. *a combination of all added, <br />copied, modified, renamed and deleted files (ACMRD)* |
|
||||||
| all\_changed\_and\_modified\_files | `string` | `'new.txt path/to/file.png ...'` | Returns all changed <br /> and modified files <br /> i.e. *a combination of (ACMRDTUX)* |
|
| all\_changed\_and\_modified\_files | `string` | `'new.txt path/to/file.png ...'` | Returns all changed <br /> and modified files <br /> i.e. *a combination of (ACMRDTUX)* |
|
||||||
| all\_old\_new\_renamed\_files | `string` | `'old name.txt,new name.txt old name 2.txt,new name 2.txt...'` | Returns only files that are Renamed and list their old and new names. <br> NOTE: This requires setting `include_all_old_new_renamed_files` to `true` (R) |
|
| all\_old\_new\_renamed\_files | `string` | `'old name.txt,new name.txt old name 2.txt,new name 2.txt...'` | Returns only files that are Renamed and list their old and new names. <br> NOTE: This requires setting `include_all_old_new_renamed_files` to `true` (R) |
|
||||||
| added\_files | `string` | `'new.txt path/to/file.png ...'` | Returns only files that are Added (A) |
|
| added\_files | `string` | `'new.txt path/to/file.png ...'` | Returns only files that are Added (A) |
|
||||||
| copied\_files | `string` | `'new.txt path/to/file.png ...'` | Returns only files that are Copied (C) |
|
| copied\_files | `string` | `'new.txt path/to/file.png ...'` | Returns only files that are Copied (C) |
|
||||||
| deleted\_files | `string` | `'new.txt path/to/file.png ...'` | Returns only files that are Deleted (D) |
|
| deleted\_files | `string` | `'new.txt path/to/file.png ...'` | Returns only files that are Deleted (D) |
|
||||||
| modified\_files | `string` | `'new.txt path/to/file.png ...'` | Returns only files that are Modified (M) |
|
| modified\_files | `string` | `'new.txt path/to/file.png ...'` | Returns only files that are Modified (M) |
|
||||||
| renamed\_files | `string` | `'new.txt path/to/file.png ...'` | Returns only files that are Renamed (R) |
|
| renamed\_files | `string` | `'new.txt path/to/file.png ...'` | Returns only files that are Renamed (R) |
|
||||||
| type\_changed\_files | `string` | `'new.txt path/to/file.png ...'` | Returns only files that have their file type changed (T) |
|
| type\_changed\_files | `string` | `'new.txt path/to/file.png ...'` | Returns only files that have their file type changed (T) |
|
||||||
| unmerged\_files | `string` | `'new.txt path/to/file.png ...'` | Returns only files that are Unmerged (U) |
|
| unmerged\_files | `string` | `'new.txt path/to/file.png ...'` | Returns only files that are Unmerged (U) |
|
||||||
| unknown\_files | `string` | `'new.txt path/to/file.png ...'` | Returns only files that are Unknown (X) |
|
| unknown\_files | `string` | `'new.txt path/to/file.png ...'` | Returns only files that are Unknown (X) |
|
||||||
|
|
||||||
## Inputs
|
## Inputs
|
||||||
|
|
||||||
| Input | type | required | default | description |
|
| Input | type | required | default | description |
|
||||||
|:--------------------------------------:|:----------------------:|:--------:|:---------------------:|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
|
|:--------------------------------------:|:----------------------:|:--------:|:-------------------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
|
||||||
| separator | `string` | `false` | `' '` | Split character for output strings |
|
| separator | `string` | `false` | `' '` | Split character for output strings |
|
||||||
| include\_all\_old\_new\_renamed\_files | `boolean` | `false` | `false` | Include `all_old_new_renamed_files` output. Note this can generate a large output See: [#501](https://github.com/tj-actions/changed-files/issues/501). |
|
| include\_all\_old\_new\_renamed\_files | `boolean` | `false` | `false` | Include `all_old_new_renamed_files` output. Note this can generate a large output See: [#501](https://github.com/tj-actions/changed-files/issues/501). |
|
||||||
| old\_new\_separator | `string` | `false` | `','` | Split character for old and new filename pairs |
|
| old\_new\_separator | `string` | `false` | `','` | Split character for old and new filename pairs |
|
||||||
| old\_new\_files\_separator | `string` | `false` | `' '` | Split character for multiple old and new filename pairs |
|
| old\_new\_files\_separator | `string` | `false` | `' '` | Split character for multiple old and new filename pairs |
|
||||||
| files | `string` OR `string[]` | `false` | | Check for changes <br> using only these <br> list of file(s) <br> (Defaults to the <br> entire repo) <br /> **NOTE:** Multiline file/directory patterns <br /> should not include qoutes. <br /> |
|
| files | `string` OR `string[]` | `false` | | Check for changes <br> using only these <br> list of file(s) <br> (Defaults to the <br> entire repo) <br /> **NOTE:** Multiline file/directory patterns <br /> should not include qoutes. <br /> |
|
||||||
| 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 |
|
||||||
| files\_from\_source\_file | `string` | `false` | | Source file(s) <br> used to populate <br> the `files` input |
|
| files\_from\_source\_file | `string` | `false` | | Source file(s) <br> used to populate <br> the `files` input |
|
||||||
| files\_ignore | `string` | `false` | | Ignore changes to these file(s) <br /> **NOTE:** Multiline file/directory patterns <br /> should not include qoutes. <br /> |
|
| files\_ignore | `string` | `false` | | Ignore changes to these file(s) <br /> **NOTE:** Multiline file/directory patterns <br /> should not include qoutes. <br /> |
|
||||||
| 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\_ignore\_from\_source\_file | `string` | `false` | | Source file(s) <br> used to populate <br> the `files_ignore` input |
|
| files\_ignore\_from\_source\_file | `string` | `false` | | Source file(s) <br> used to populate <br> the `files_ignore` input |
|
||||||
| sha | `string` | `true` | `${{ github.sha }}` | Specify a different <br> commit SHA <br> used for <br> comparing changes |
|
| sha | `string` | `true` | `${{ github.sha }}` | Specify a different <br> commit SHA <br> used for <br> comparing changes |
|
||||||
| base\_sha | `string` | `false` | | Specify a different <br> base commit SHA <br> used for <br> comparing changes |
|
| base\_sha | `string` | `false` | | Specify a different <br> base commit SHA <br> used for <br> comparing changes |
|
||||||
| path | `string` | `false` | `'.'` | Relative path under <br> `GITHUB_WORKSPACE` <br> to the repository |
|
| path | `string` | `false` | `'.'` | Relative path under <br> `GITHUB_WORKSPACE` <br> to the repository |
|
||||||
| quotepath | `boolean` | `false` | `true` | Output filenames completely verbatim by setting this to `false` |
|
| quotepath | `boolean` | `false` | `true` | Output filenames completely verbatim by setting this to `false` |
|
||||||
| diff\_relative | `boolean` | `false` | | Exclude changes outside the current directory and show pathnames relative to it. **NOTE:** This requires you to specify the top level directory via the `path` input. |
|
| diff\_relative | `boolean` | `false` | | Exclude changes outside the current directory and show pathnames relative to it. **NOTE:** This requires you to specify the top level directory via the `path` input. |
|
||||||
| dir\_names | `boolean` | `false` | `false` | Output unique changed directories instead of filenames. <br> **NOTE:** This returns `.` for <br> changed files located in the root of the project. |
|
| dir\_names | `boolean` | `false` | `false` | Output unique changed directories instead of filenames. <br> **NOTE:** This returns `.` for <br> changed files located in the root of the project. |
|
||||||
| json | `boolean` | `false` | `false` | Output changed files in JSON format which can be used for [matrix jobs](https://github.com/tj-actions/changed-files/blob/main/.github/workflows/manual-matrix-test.yml). |
|
| json | `boolean` | `false` | `false` | Output changed files in JSON format which can be used for [matrix jobs](https://github.com/tj-actions/changed-files/blob/main/.github/workflows/manual-matrix-test.yml). |
|
||||||
| since | `string` | `false` | | Get changed files for commits whose timestamp is older than the given time. |
|
| since | `string` | `false` | | Get changed files for commits whose timestamp is older than the given time. |
|
||||||
| until | `string` | `false` | | Get changed files for commits whose timestamp is earlier than the given time. |
|
| until | `string` | `false` | | Get changed files for commits whose timestamp is earlier than the given time. |
|
||||||
|
| target\_branch\_fetch\_depth | `string` | `false` | `20` | Limit fetching commits from the target branch to a specified number. **NOTE**: This can be adjusted to resolve errors with insufficient history. See: [#668](https://github.com/tj-actions/changed-files/issues/668). |
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
@@ -175,11 +176,11 @@ Support this project with a :star:
|
|||||||
|
|
||||||
- name: Get changed files using defaults
|
- name: Get changed files using defaults
|
||||||
id: changed-files
|
id: changed-files
|
||||||
uses: tj-actions/changed-files@v31
|
uses: tj-actions/changed-files@v32
|
||||||
|
|
||||||
- name: Get changed files using a comma separator
|
- name: Get changed files using a comma separator
|
||||||
id: changed-files-comma
|
id: changed-files-comma
|
||||||
uses: tj-actions/changed-files@v31
|
uses: tj-actions/changed-files@v32
|
||||||
with:
|
with:
|
||||||
separator: ","
|
separator: ","
|
||||||
|
|
||||||
@@ -201,7 +202,7 @@ Support this project with a :star:
|
|||||||
|
|
||||||
- name: Get specific changed files
|
- name: Get specific changed files
|
||||||
id: changed-files-specific
|
id: changed-files-specific
|
||||||
uses: tj-actions/changed-files@v31
|
uses: tj-actions/changed-files@v32
|
||||||
with:
|
with:
|
||||||
files: |
|
files: |
|
||||||
my-file.txt
|
my-file.txt
|
||||||
@@ -242,14 +243,14 @@ Support this project with a :star:
|
|||||||
|
|
||||||
- name: Use a source file or list of file(s) to populate to files input.
|
- name: Use a source file or list of file(s) to populate to files input.
|
||||||
id: changed-files-specific-source-file
|
id: changed-files-specific-source-file
|
||||||
uses: tj-actions/changed-files@v31
|
uses: tj-actions/changed-files@v32
|
||||||
with:
|
with:
|
||||||
files_from_source_file: |
|
files_from_source_file: |
|
||||||
test/changed-files-list.txt
|
test/changed-files-list.txt
|
||||||
|
|
||||||
- name: Use a source file or list of file(s) to populate to files input and optionally specify more files.
|
- name: Use a source file or list of file(s) to populate to files input and optionally specify more files.
|
||||||
id: changed-files-specific-source-file-and-specify-files
|
id: changed-files-specific-source-file-and-specify-files
|
||||||
uses: tj-actions/changed-files@v31
|
uses: tj-actions/changed-files@v32
|
||||||
with:
|
with:
|
||||||
files_from_source_file: |
|
files_from_source_file: |
|
||||||
test/changed-files-list.txt
|
test/changed-files-list.txt
|
||||||
@@ -258,13 +259,13 @@ Support this project with a :star:
|
|||||||
|
|
||||||
- name: Use a different commit SHA
|
- name: Use a different commit SHA
|
||||||
id: changed-files-custom-sha
|
id: changed-files-custom-sha
|
||||||
uses: tj-actions/changed-files@v31
|
uses: tj-actions/changed-files@v32
|
||||||
with:
|
with:
|
||||||
sha: ${{ github.event.pull_request.head.sha }}
|
sha: ${{ github.event.pull_request.head.sha }}
|
||||||
|
|
||||||
- name: Use a different base SHA
|
- name: Use a different base SHA
|
||||||
id: changed-files-custom-base-sha
|
id: changed-files-custom-base-sha
|
||||||
uses: tj-actions/changed-files@v31
|
uses: tj-actions/changed-files@v32
|
||||||
with:
|
with:
|
||||||
base_sha: ${{ github.event.pull_request.base.sha }}
|
base_sha: ${{ github.event.pull_request.base.sha }}
|
||||||
|
|
||||||
@@ -276,7 +277,7 @@ Support this project with a :star:
|
|||||||
|
|
||||||
- name: Run changed-files with defaults on the dir1
|
- name: Run changed-files with defaults on the dir1
|
||||||
id: changed-files-for-dir1
|
id: changed-files-for-dir1
|
||||||
uses: tj-actions/changed-files@v31
|
uses: tj-actions/changed-files@v32
|
||||||
with:
|
with:
|
||||||
path: dir1
|
path: dir1
|
||||||
|
|
||||||
@@ -288,14 +289,14 @@ Support this project with a :star:
|
|||||||
|
|
||||||
- name: Run changed-files with quotepath disabled
|
- name: Run changed-files with quotepath disabled
|
||||||
id: changed-files-quotepath
|
id: changed-files-quotepath
|
||||||
uses: tj-actions/changed-files@v31
|
uses: tj-actions/changed-files@v32
|
||||||
with:
|
with:
|
||||||
quotepath: "false"
|
quotepath: "false"
|
||||||
|
|
||||||
# Run changed-files action using the last successful commit as the base_sha
|
# Run changed-files action using the last successful commit as the base_sha
|
||||||
# NOTE: This setting overrides the commit sha used by setting since_last_remote_commit to true.
|
# NOTE: This setting overrides the commit sha used by setting since_last_remote_commit to true.
|
||||||
# It is recommended to use either solution that works for your use case.
|
# It is recommended to use either solution that works for your use case.
|
||||||
|
|
||||||
# Push event based workflows
|
# Push event based workflows
|
||||||
- name: Get branch name
|
- name: Get branch name
|
||||||
id: branch-name
|
id: branch-name
|
||||||
@@ -310,7 +311,7 @@ Support this project with a :star:
|
|||||||
|
|
||||||
- name: Run changed-files with the commit of the last successful test workflow run
|
- name: Run changed-files with the commit of the last successful test workflow run
|
||||||
id: changed-files-base-sha-push
|
id: changed-files-base-sha-push
|
||||||
uses: tj-actions/changed-files@v31
|
uses: tj-actions/changed-files@v32
|
||||||
with:
|
with:
|
||||||
base_sha: ${{ steps.last_successful_commit_push.outputs.commit_hash }}
|
base_sha: ${{ steps.last_successful_commit_push.outputs.commit_hash }}
|
||||||
|
|
||||||
@@ -331,32 +332,32 @@ Support this project with a :star:
|
|||||||
- name: Run changed-files with the commit of the last successful test workflow run on main
|
- name: Run changed-files with the commit of the last successful test workflow run on main
|
||||||
if: github.event_name == 'pull_request'
|
if: github.event_name == 'pull_request'
|
||||||
id: changed-files-base-sha-pull-request
|
id: changed-files-base-sha-pull-request
|
||||||
uses: tj-actions/changed-files@v31
|
uses: tj-actions/changed-files@v32
|
||||||
with:
|
with:
|
||||||
base_sha: ${{ steps.last_successful_commit_pull_request.outputs.commit_hash }}
|
base_sha: ${{ steps.last_successful_commit_pull_request.outputs.commit_hash }}
|
||||||
|
|
||||||
- name: Run changed-files with dir_names
|
- name: Run changed-files with dir_names
|
||||||
id: changed-files-dir-names
|
id: changed-files-dir-names
|
||||||
uses: tj-actions/changed-files@v31
|
uses: tj-actions/changed-files@v32
|
||||||
with:
|
with:
|
||||||
dir_names: "true"
|
dir_names: "true"
|
||||||
|
|
||||||
# All outputs are JSON formatted arrays and can be used in other actions and matrix compatible jobs.
|
# All outputs are JSON formatted arrays and can be used in other actions and matrix compatible jobs.
|
||||||
- name: Run changed-files with json output
|
- name: Run changed-files with json output
|
||||||
id: changed-files-json
|
id: changed-files-json
|
||||||
uses: tj-actions/changed-files@v31
|
uses: tj-actions/changed-files@v32
|
||||||
wi
|
with:
|
||||||
json: "true"
|
json: "true"
|
||||||
|
|
||||||
- name: Run changed-files since 2022-08-19
|
- name: Run changed-files since 2022-08-19
|
||||||
id: changed-files-since
|
id: changed-files-since
|
||||||
uses: tj-actions/changed-files@v31
|
uses: tj-actions/changed-files@v32
|
||||||
with:
|
with:
|
||||||
since: "2022-08-19"
|
since: "2022-08-19"
|
||||||
|
|
||||||
- name: Run changed-files until 2022-08-20
|
- name: Run changed-files until 2022-08-20
|
||||||
id: changed-files-until
|
id: changed-files-until
|
||||||
uses: tj-actions/changed-files@v31
|
uses: tj-actions/changed-files@v32
|
||||||
with:
|
with:
|
||||||
until: "2022-08-20"
|
until: "2022-08-20"
|
||||||
```
|
```
|
||||||
@@ -403,24 +404,30 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
|
|||||||
<!-- markdownlint-disable -->
|
<!-- markdownlint-disable -->
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tbody>
|
||||||
<td align="center"><a href="https://github.com/jsoref"><img src="https://avatars.githubusercontent.com/u/2119212?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Josh Soref</b></sub></a><br /><a href="https://github.com/tj-actions/changed-files/commits?author=jsoref" title="Documentation">📖</a></td>
|
<tr>
|
||||||
<td align="center"><a href="https://github.com/monoxgas"><img src="https://avatars.githubusercontent.com/u/1223016?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Nick Landers</b></sub></a><br /><a href="https://github.com/tj-actions/changed-files/commits?author=monoxgas" title="Code">💻</a></td>
|
<td align="center"><a href="https://github.com/jsoref"><img src="https://avatars.githubusercontent.com/u/2119212?v=4?s=100" width="100px;" alt="Josh Soref"/><br /><sub><b>Josh Soref</b></sub></a><br /><a href="https://github.com/tj-actions/changed-files/commits?author=jsoref" title="Documentation">📖</a></td>
|
||||||
<td align="center"><a href="https://github.com/Kras4ooo"><img src="https://avatars.githubusercontent.com/u/1948054?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Krasimir Nikolov</b></sub></a><br /><a href="https://github.com/tj-actions/changed-files/commits?author=Kras4ooo" title="Code">💻</a> <a href="https://github.com/tj-actions/changed-files/commits?author=Kras4ooo" title="Documentation">📖</a></td>
|
<td align="center"><a href="https://github.com/monoxgas"><img src="https://avatars.githubusercontent.com/u/1223016?v=4?s=100" width="100px;" alt="Nick Landers"/><br /><sub><b>Nick Landers</b></sub></a><br /><a href="https://github.com/tj-actions/changed-files/commits?author=monoxgas" title="Code">💻</a></td>
|
||||||
<td align="center"><a href="https://github.com/IvanPizhenko"><img src="https://avatars.githubusercontent.com/u/11859904?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ivan Pizhenko</b></sub></a><br /><a href="https://github.com/tj-actions/changed-files/commits?author=IvanPizhenko" title="Code">💻</a> <a href="https://github.com/tj-actions/changed-files/commits?author=IvanPizhenko" title="Documentation">📖</a></td>
|
<td align="center"><a href="https://github.com/Kras4ooo"><img src="https://avatars.githubusercontent.com/u/1948054?v=4?s=100" width="100px;" alt="Krasimir Nikolov"/><br /><sub><b>Krasimir Nikolov</b></sub></a><br /><a href="https://github.com/tj-actions/changed-files/commits?author=Kras4ooo" title="Code">💻</a> <a href="https://github.com/tj-actions/changed-files/commits?author=Kras4ooo" title="Documentation">📖</a></td>
|
||||||
<td align="center"><a href="https://github.com/talva-tr"><img src="https://avatars.githubusercontent.com/u/82046981?v=4?s=100" width="100px;" alt=""/><br /><sub><b>talva-tr</b></sub></a><br /><a href="https://github.com/tj-actions/changed-files/commits?author=talva-tr" title="Code">💻</a></td>
|
<td align="center"><a href="https://github.com/IvanPizhenko"><img src="https://avatars.githubusercontent.com/u/11859904?v=4?s=100" width="100px;" alt="Ivan Pizhenko"/><br /><sub><b>Ivan Pizhenko</b></sub></a><br /><a href="https://github.com/tj-actions/changed-files/commits?author=IvanPizhenko" title="Code">💻</a> <a href="https://github.com/tj-actions/changed-files/commits?author=IvanPizhenko" title="Documentation">📖</a></td>
|
||||||
<td align="center"><a href="https://bandism.net/"><img src="https://avatars.githubusercontent.com/u/22633385?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ikko Ashimine</b></sub></a><br /><a href="https://github.com/tj-actions/changed-files/commits?author=eltociear" title="Documentation">📖</a></td>
|
<td align="center"><a href="https://github.com/talva-tr"><img src="https://avatars.githubusercontent.com/u/82046981?v=4?s=100" width="100px;" alt="talva-tr"/><br /><sub><b>talva-tr</b></sub></a><br /><a href="https://github.com/tj-actions/changed-files/commits?author=talva-tr" title="Code">💻</a></td>
|
||||||
<td align="center"><a href="https://github.com/Zamiell"><img src="https://avatars.githubusercontent.com/u/5511220?v=4?s=100" width="100px;" alt=""/><br /><sub><b>James</b></sub></a><br /><a href="https://github.com/tj-actions/changed-files/commits?author=Zamiell" title="Documentation">📖</a></td>
|
<td align="center"><a href="https://bandism.net/"><img src="https://avatars.githubusercontent.com/u/22633385?v=4?s=100" width="100px;" alt="Ikko Ashimine"/><br /><sub><b>Ikko Ashimine</b></sub></a><br /><a href="https://github.com/tj-actions/changed-files/commits?author=eltociear" title="Documentation">📖</a></td>
|
||||||
</tr>
|
<td align="center"><a href="https://github.com/Zamiell"><img src="https://avatars.githubusercontent.com/u/5511220?v=4?s=100" width="100px;" alt="James"/><br /><sub><b>James</b></sub></a><br /><a href="https://github.com/tj-actions/changed-files/commits?author=Zamiell" title="Documentation">📖</a></td>
|
||||||
<tr>
|
</tr>
|
||||||
<td align="center"><a href="https://github.com/wushujames"><img src="https://avatars.githubusercontent.com/u/677529?v=4?s=100" width="100px;" alt=""/><br /><sub><b>James Cheng</b></sub></a><br /><a href="https://github.com/tj-actions/changed-files/commits?author=wushujames" title="Documentation">📖</a></td>
|
<tr>
|
||||||
<td align="center"><a href="https://qiita.com/SUZUKI_Masaya"><img src="https://avatars.githubusercontent.com/u/15100604?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Masaya Suzuki</b></sub></a><br /><a href="https://github.com/tj-actions/changed-files/commits?author=massongit" title="Code">💻</a></td>
|
<td align="center"><a href="https://github.com/wushujames"><img src="https://avatars.githubusercontent.com/u/677529?v=4?s=100" width="100px;" alt="James Cheng"/><br /><sub><b>James Cheng</b></sub></a><br /><a href="https://github.com/tj-actions/changed-files/commits?author=wushujames" title="Documentation">📖</a></td>
|
||||||
<td align="center"><a href="https://fagai.net"><img src="https://avatars.githubusercontent.com/u/1772112?v=4?s=100" width="100px;" alt=""/><br /><sub><b>fagai</b></sub></a><br /><a href="https://github.com/tj-actions/changed-files/commits?author=fagai" title="Documentation">📖</a></td>
|
<td align="center"><a href="https://qiita.com/SUZUKI_Masaya"><img src="https://avatars.githubusercontent.com/u/15100604?v=4?s=100" width="100px;" alt="Masaya Suzuki"/><br /><sub><b>Masaya Suzuki</b></sub></a><br /><a href="https://github.com/tj-actions/changed-files/commits?author=massongit" title="Code">💻</a></td>
|
||||||
<td align="center"><a href="https://github.com/pkit"><img src="https://avatars.githubusercontent.com/u/805654?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Constantine Peresypkin</b></sub></a><br /><a href="https://github.com/tj-actions/changed-files/commits?author=pkit" title="Code">💻</a></td>
|
<td align="center"><a href="https://fagai.net"><img src="https://avatars.githubusercontent.com/u/1772112?v=4?s=100" width="100px;" alt="fagai"/><br /><sub><b>fagai</b></sub></a><br /><a href="https://github.com/tj-actions/changed-files/commits?author=fagai" title="Documentation">📖</a></td>
|
||||||
<td align="center"><a href="https://github.com/deronnax"><img src="https://avatars.githubusercontent.com/u/439279?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Mathieu Dupuy</b></sub></a><br /><a href="https://github.com/tj-actions/changed-files/commits?author=deronnax" title="Documentation">📖</a></td>
|
<td align="center"><a href="https://github.com/pkit"><img src="https://avatars.githubusercontent.com/u/805654?v=4?s=100" width="100px;" alt="Constantine Peresypkin"/><br /><sub><b>Constantine Peresypkin</b></sub></a><br /><a href="https://github.com/tj-actions/changed-files/commits?author=pkit" title="Code">💻</a></td>
|
||||||
<td align="center"><a href="https://github.com/JoeOvo"><img src="https://avatars.githubusercontent.com/u/100686542?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Joe Moggridge</b></sub></a><br /><a href="https://github.com/tj-actions/changed-files/commits?author=JoeOvo" title="Documentation">📖</a></td>
|
<td align="center"><a href="https://github.com/deronnax"><img src="https://avatars.githubusercontent.com/u/439279?v=4?s=100" width="100px;" alt="Mathieu Dupuy"/><br /><sub><b>Mathieu Dupuy</b></sub></a><br /><a href="https://github.com/tj-actions/changed-files/commits?author=deronnax" title="Documentation">📖</a></td>
|
||||||
<td align="center"><a href="https://www.credly.com/users/thyarles/badges"><img src="https://avatars.githubusercontent.com/u/1340046?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Charles Santos</b></sub></a><br /><a href="https://github.com/tj-actions/changed-files/commits?author=thyarles" title="Code">💻</a></td>
|
<td align="center"><a href="https://github.com/JoeOvo"><img src="https://avatars.githubusercontent.com/u/100686542?v=4?s=100" width="100px;" alt="Joe Moggridge"/><br /><sub><b>Joe Moggridge</b></sub></a><br /><a href="https://github.com/tj-actions/changed-files/commits?author=JoeOvo" title="Documentation">📖</a></td>
|
||||||
</tr>
|
<td align="center"><a href="https://www.credly.com/users/thyarles/badges"><img src="https://avatars.githubusercontent.com/u/1340046?v=4?s=100" width="100px;" alt="Charles Santos"/><br /><sub><b>Charles Santos</b></sub></a><br /><a href="https://github.com/tj-actions/changed-files/commits?author=thyarles" title="Code">💻</a></td>
|
||||||
|
</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/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>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<!-- markdownlint-restore -->
|
<!-- markdownlint-restore -->
|
||||||
|
|||||||
44
action.yml
44
action.yml
@@ -77,6 +77,10 @@ inputs:
|
|||||||
description: "Output changed files in JSON format which can be used for matrix jobs"
|
description: "Output changed files in JSON format which can be used for matrix jobs"
|
||||||
required: false
|
required: false
|
||||||
default: "false"
|
default: "false"
|
||||||
|
target_branch_fetch_depth:
|
||||||
|
description: "Limit fetching commits from the target branch to a specified number. **NOTE**: This can be adjusted to resolve errors with insufficient history. See: [#668](https://github.com/tj-actions/changed-files/issues/668)."
|
||||||
|
required: false
|
||||||
|
default: "20"
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
added_files:
|
added_files:
|
||||||
@@ -146,33 +150,6 @@ outputs:
|
|||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
- run: |
|
|
||||||
# "Calculate the base sha..."
|
|
||||||
bash $GITHUB_ACTION_PATH/get-base-sha.sh
|
|
||||||
id: base-sha
|
|
||||||
shell: bash
|
|
||||||
env:
|
|
||||||
GITHUB_WORKSPACE: ${{ github.workspace }}
|
|
||||||
GITHUB_EVENT_BEFORE: ${{ github.event.before }}
|
|
||||||
GITHUB_EVENT_FORCED : ${{ github.event.forced }}
|
|
||||||
# INPUT_<VARIABLE_NAME> is not available in Composite run steps
|
|
||||||
# https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#example-specifying-inputs
|
|
||||||
INPUT_SINCE: ${{ inputs.since }}
|
|
||||||
INPUT_BASE_SHA: ${{ inputs.base_sha }}
|
|
||||||
INPUT_SHA: ${{ inputs.sha }}
|
|
||||||
INPUT_PATH: ${{ inputs.path }}
|
|
||||||
- run: |
|
|
||||||
# "Calculate the sha..."
|
|
||||||
bash $GITHUB_ACTION_PATH/get-sha.sh
|
|
||||||
id: sha
|
|
||||||
shell: bash
|
|
||||||
env:
|
|
||||||
GITHUB_WORKSPACE: ${{ github.workspace }}
|
|
||||||
# INPUT_<VARIABLE_NAME> is not available in Composite run steps
|
|
||||||
# https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#example-specifying-inputs
|
|
||||||
INPUT_UNTIL: ${{ inputs.until }}
|
|
||||||
INPUT_SHA: ${{ inputs.sha }}
|
|
||||||
INPUT_PATH: ${{ inputs.path }}
|
|
||||||
- run: |
|
- run: |
|
||||||
# "Calculating the previous and current SHA..."
|
# "Calculating the previous and current SHA..."
|
||||||
bash $GITHUB_ACTION_PATH/diff-sha.sh
|
bash $GITHUB_ACTION_PATH/diff-sha.sh
|
||||||
@@ -184,16 +161,19 @@ runs:
|
|||||||
GITHUB_BASE_REF: ${{ github.base_ref }}
|
GITHUB_BASE_REF: ${{ github.base_ref }}
|
||||||
GITHUB_HEAD_REF: ${{ github.head_ref }}
|
GITHUB_HEAD_REF: ${{ github.head_ref }}
|
||||||
GITHUB_WORKSPACE: ${{ github.workspace }}
|
GITHUB_WORKSPACE: ${{ github.workspace }}
|
||||||
GITHUB_PULL_REQUEST_BASE_SHA: ${{ github.event.pull_request.base.sha }}
|
GITHUB_EVENT_PULL_REQUEST_BASE_SHA: ${{ github.event.pull_request.base.sha }}
|
||||||
GITHUB_EVENT_BEFORE: ${{ github.event.before }}
|
GITHUB_EVENT_BEFORE: ${{ github.event.before }}
|
||||||
GITHUB_EVENT_FORCED : ${{ github.event.forced }}
|
GITHUB_EVENT_FORCED: ${{ github.event.forced }}
|
||||||
# INPUT_<VARIABLE_NAME> is not available in Composite run steps
|
# INPUT_<VARIABLE_NAME> is not available in Composite run steps
|
||||||
# https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#example-specifying-inputs
|
# https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#example-specifying-inputs
|
||||||
INPUT_SHA: ${{ steps.sha.outputs.sha }}
|
INPUT_SHA: ${{ inputs.sha }}
|
||||||
INPUT_BASE_SHA: ${{ steps.base-sha.outputs.base_sha }}
|
INPUT_BASE_SHA: ${{ inputs.base_sha }}
|
||||||
|
INPUT_SINCE: ${{ inputs.since }}
|
||||||
|
INPUT_UNTIL: ${{ inputs.until }}
|
||||||
INPUT_PATH: ${{ inputs.path }}
|
INPUT_PATH: ${{ inputs.path }}
|
||||||
|
INPUT_TARGET_BRANCH_FETCH_DEPTH: ${{ inputs.target_branch_fetch_depth }}
|
||||||
- name: Glob match
|
- name: Glob match
|
||||||
uses: tj-actions/glob@v13
|
uses: tj-actions/glob@v15
|
||||||
id: glob
|
id: glob
|
||||||
with:
|
with:
|
||||||
files: ${{ inputs.files }}
|
files: ${{ inputs.files }}
|
||||||
|
|||||||
89
diff-sha.sh
89
diff-sha.sh
@@ -3,6 +3,7 @@
|
|||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
INITIAL_COMMIT="false"
|
INITIAL_COMMIT="false"
|
||||||
|
GITHUB_OUTPUT=${GITHUB_OUTPUT:-""}
|
||||||
|
|
||||||
echo "::group::changed-files-diff-sha"
|
echo "::group::changed-files-diff-sha"
|
||||||
|
|
||||||
@@ -39,10 +40,20 @@ fi
|
|||||||
|
|
||||||
echo "::debug::Getting HEAD SHA..."
|
echo "::debug::Getting HEAD SHA..."
|
||||||
|
|
||||||
if [[ -z $INPUT_SHA ]]; then
|
if [[ -n "$INPUT_UNTIL" ]]; then
|
||||||
CURRENT_SHA=$(git rev-list -n 1 "HEAD" 2>&1) && exit_status=$? || exit_status=$?
|
echo "::debug::Getting HEAD SHA for '$INPUT_UNTIL'..."
|
||||||
|
CURRENT_SHA=$(git log -1 --format="%H" --date=local --until="$INPUT_UNTIL") && exit_status=$? || exit_status=$?
|
||||||
|
|
||||||
|
if [[ $exit_status -ne 0 ]]; then
|
||||||
|
echo "::error::Invalid until date: $INPUT_UNTIL"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
CURRENT_SHA=$INPUT_SHA; exit_status=$?
|
if [[ -z $INPUT_SHA ]]; then
|
||||||
|
CURRENT_SHA=$(git rev-list -n 1 "HEAD" 2>&1) && exit_status=$? || exit_status=$?
|
||||||
|
else
|
||||||
|
CURRENT_SHA=$INPUT_SHA; exit_status=$?
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "::debug::Verifying the current commit SHA: $CURRENT_SHA"
|
echo "::debug::Verifying the current commit SHA: $CURRENT_SHA"
|
||||||
@@ -62,23 +73,39 @@ if [[ -z $GITHUB_BASE_REF ]]; then
|
|||||||
CURRENT_BRANCH=$TARGET_BRANCH && exit_status=$? || exit_status=$?
|
CURRENT_BRANCH=$TARGET_BRANCH && exit_status=$? || exit_status=$?
|
||||||
|
|
||||||
if [[ -z $INPUT_BASE_SHA ]]; then
|
if [[ -z $INPUT_BASE_SHA ]]; then
|
||||||
git fetch --no-tags -u --progress origin --depth=2 "${TARGET_BRANCH}":"${TARGET_BRANCH}" && exit_status=$? || exit_status=$?
|
if [[ -n "$INPUT_SINCE" ]]; then
|
||||||
PREVIOUS_SHA=""
|
echo "::debug::Getting base SHA for '$INPUT_SINCE'..."
|
||||||
|
PREVIOUS_SHA=$(git log --format="%H" --date=local --since="$INPUT_SINCE" | tail -1) && exit_status=$? || exit_status=$?
|
||||||
|
|
||||||
if [[ "$GITHUB_EVENT_FORCED" == "false" ]]; then
|
if [[ -z "$PREVIOUS_SHA" ]]; then
|
||||||
PREVIOUS_SHA=$GITHUB_EVENT_BEFORE
|
echo "::error::Unable to locate a previous commit for the specified date: $INPUT_SINCE"
|
||||||
fi
|
exit 1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
git fetch --no-tags -u --progress origin --depth="$INPUT_TARGET_BRANCH_FETCH_DEPTH" "${TARGET_BRANCH}":"${TARGET_BRANCH}" && exit_status=$? || exit_status=$?
|
||||||
|
|
||||||
if [[ -z "$PREVIOUS_SHA" || "$PREVIOUS_SHA" == "0000000000000000000000000000000000000000" ]]; then
|
PREVIOUS_SHA=""
|
||||||
PREVIOUS_SHA=$(git rev-parse "$(git branch -r --sort=-committerdate | head -1 | xargs)")
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "$PREVIOUS_SHA" == "$CURRENT_SHA" ]]; then
|
if [[ "$GITHUB_EVENT_FORCED" == "false" ]]; then
|
||||||
PREVIOUS_SHA=$(git rev-parse "$CURRENT_SHA^1")
|
PREVIOUS_SHA=$GITHUB_EVENT_BEFORE
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -z "$PREVIOUS_SHA" || "$PREVIOUS_SHA" == "0000000000000000000000000000000000000000" ]]; then
|
||||||
|
PREVIOUS_SHA=$(git rev-parse "$(git branch -r --sort=-committerdate | head -1 | xargs)")
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ "$PREVIOUS_SHA" == "$CURRENT_SHA" ]]; then
|
if [[ "$PREVIOUS_SHA" == "$CURRENT_SHA" ]]; then
|
||||||
INITIAL_COMMIT="true"
|
PREVIOUS_SHA=$(git rev-parse "$CURRENT_SHA^1")
|
||||||
echo "::debug::Initial commit detected"
|
|
||||||
|
if [[ "$PREVIOUS_SHA" == "$CURRENT_SHA" ]]; then
|
||||||
|
INITIAL_COMMIT="true"
|
||||||
|
echo "::debug::Initial commit detected"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -z "$PREVIOUS_SHA" ]]; then
|
||||||
|
echo "::error::Unable to locate a previous commit"
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
@@ -103,20 +130,19 @@ else
|
|||||||
TARGET_BRANCH=$GITHUB_BASE_REF
|
TARGET_BRANCH=$GITHUB_BASE_REF
|
||||||
CURRENT_BRANCH=$GITHUB_HEAD_REF
|
CURRENT_BRANCH=$GITHUB_HEAD_REF
|
||||||
|
|
||||||
echo "::debug::GITHUB_BASE_REF: $TARGET_BRANCH..."
|
git fetch --no-tags -u --progress origin --depth="$INPUT_TARGET_BRANCH_FETCH_DEPTH" "${TARGET_BRANCH}":"${TARGET_BRANCH}" &&
|
||||||
|
exit_status=$? || exit_status=$?
|
||||||
|
|
||||||
if [[ -z $INPUT_BASE_SHA ]]; then
|
if [[ -z $INPUT_BASE_SHA ]]; then
|
||||||
git fetch --no-tags -u --progress origin --depth=1 "${TARGET_BRANCH}":"${TARGET_BRANCH}" && exit_status=$? || exit_status=$?
|
PREVIOUS_SHA=$GITHUB_EVENT_PULL_REQUEST_BASE_SHA && exit_status=$? || exit_status=$?
|
||||||
PREVIOUS_SHA=$GITHUB_PULL_REQUEST_BASE_SHA && exit_status=$? || exit_status=$?
|
|
||||||
echo "::debug::Previous SHA: $PREVIOUS_SHA"
|
echo "::debug::Previous SHA: $PREVIOUS_SHA"
|
||||||
else
|
else
|
||||||
git fetch --no-tags -u --progress origin --depth=1 "$(git rev-parse --verify "$INPUT_BASE_SHA")" && exit_status=$? || exit_status=$?
|
PREVIOUS_SHA=$INPUT_BASE_SHA && exit_status=$? || exit_status=$?
|
||||||
PREVIOUS_SHA=$INPUT_BASE_SHA
|
|
||||||
TARGET_BRANCH=$(git name-rev --name-only "$PREVIOUS_SHA" 2>&1) && exit_status=$? || exit_status=$?
|
|
||||||
echo "::debug::Previous SHA: $PREVIOUS_SHA"
|
|
||||||
echo "::debug::Target branch: $TARGET_BRANCH"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "::debug::Target branch: $TARGET_BRANCH"
|
||||||
|
echo "::debug::Current branch: $CURRENT_BRANCH"
|
||||||
|
|
||||||
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=$?
|
||||||
|
|
||||||
@@ -133,9 +159,18 @@ if [[ -n "$PREVIOUS_SHA" && -n "$CURRENT_SHA" && "$PREVIOUS_SHA" == "$CURRENT_SH
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "::set-output name=target_branch::$TARGET_BRANCH"
|
if [[ -z "$GITHUB_OUTPUT" ]]; then
|
||||||
echo "::set-output name=current_branch::$CURRENT_BRANCH"
|
echo "::set-output name=target_branch::$TARGET_BRANCH"
|
||||||
echo "::set-output name=previous_sha::$PREVIOUS_SHA"
|
echo "::set-output name=current_branch::$CURRENT_BRANCH"
|
||||||
echo "::set-output name=current_sha::$CURRENT_SHA"
|
echo "::set-output name=previous_sha::$PREVIOUS_SHA"
|
||||||
|
echo "::set-output name=current_sha::$CURRENT_SHA"
|
||||||
|
else
|
||||||
|
cat <<EOF >> "$GITHUB_OUTPUT"
|
||||||
|
target_branch=$TARGET_BRANCH
|
||||||
|
current_branch=$CURRENT_BRANCH
|
||||||
|
previous_sha=$PREVIOUS_SHA
|
||||||
|
current_sha=$CURRENT_SHA
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
|
|||||||
@@ -1,24 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -eu
|
|
||||||
|
|
||||||
if [[ -n $INPUT_PATH ]]; then
|
|
||||||
REPO_DIR="$GITHUB_WORKSPACE/$INPUT_PATH"
|
|
||||||
|
|
||||||
echo "Resolving repository path: $REPO_DIR"
|
|
||||||
if [[ ! -d "$REPO_DIR" ]]; then
|
|
||||||
echo "::error::Invalid repository path: $REPO_DIR"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
cd "$REPO_DIR"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -n "$INPUT_SINCE" ]]; then
|
|
||||||
BASE_SHA=$(git log --format="%H" --date=local --since="$INPUT_SINCE" --reverse | head -n 1)
|
|
||||||
if [[ -z "$BASE_SHA" ]]; then
|
|
||||||
echo "::warning::The BASE_SHA for date '$INPUT_SINCE' couldn't be determined."
|
|
||||||
fi
|
|
||||||
echo "::set-output name=base_sha::$BASE_SHA"
|
|
||||||
elif [[ -n "$INPUT_BASE_SHA" ]]; then
|
|
||||||
echo "::set-output name=base_sha::$INPUT_BASE_SHA"
|
|
||||||
fi
|
|
||||||
@@ -7,6 +7,8 @@ INPUT_SEPARATOR="${INPUT_SEPARATOR//'.'/'%2E'}"
|
|||||||
INPUT_SEPARATOR="${INPUT_SEPARATOR//$'\n'/'%0A'}"
|
INPUT_SEPARATOR="${INPUT_SEPARATOR//$'\n'/'%0A'}"
|
||||||
INPUT_SEPARATOR="${INPUT_SEPARATOR//$'\r'/'%0D'}"
|
INPUT_SEPARATOR="${INPUT_SEPARATOR//$'\r'/'%0D'}"
|
||||||
|
|
||||||
|
GITHUB_OUTPUT=${GITHUB_OUTPUT:-""}
|
||||||
|
|
||||||
if [[ $INPUT_QUOTEPATH == "false" ]]; then
|
if [[ $INPUT_QUOTEPATH == "false" ]]; then
|
||||||
git config --global core.quotepath off
|
git config --global core.quotepath off
|
||||||
else
|
else
|
||||||
@@ -79,8 +81,6 @@ fi
|
|||||||
|
|
||||||
echo "Retrieving changes between $INPUT_PREVIOUS_SHA ($INPUT_TARGET_BRANCH) → $INPUT_CURRENT_SHA ($INPUT_CURRENT_BRANCH)"
|
echo "Retrieving changes between $INPUT_PREVIOUS_SHA ($INPUT_TARGET_BRANCH) → $INPUT_CURRENT_SHA ($INPUT_CURRENT_BRANCH)"
|
||||||
|
|
||||||
echo "Getting diff..."
|
|
||||||
|
|
||||||
if [[ "$INPUT_HAS_CUSTOM_PATTERNS" == "false" ]]; then
|
if [[ "$INPUT_HAS_CUSTOM_PATTERNS" == "false" ]]; then
|
||||||
if [[ "$INPUT_JSON" == "false" ]]; then
|
if [[ "$INPUT_JSON" == "false" ]]; then
|
||||||
ADDED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" A | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
ADDED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" A | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
@@ -133,9 +133,17 @@ else
|
|||||||
|
|
||||||
if [[ -n "${ALL_CHANGED}" ]]; then
|
if [[ -n "${ALL_CHANGED}" ]]; then
|
||||||
echo "::debug::Matching changed files: ${ALL_CHANGED}"
|
echo "::debug::Matching changed files: ${ALL_CHANGED}"
|
||||||
echo "::set-output name=any_changed::true"
|
if [[ -z "$GITHUB_OUTPUT" ]]; then
|
||||||
|
echo "::set-output name=any_changed::true"
|
||||||
|
else
|
||||||
|
echo "any_changed=true" >> "$GITHUB_OUTPUT"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo "::set-output name=any_changed::false"
|
if [[ -z "$GITHUB_OUTPUT" ]]; then
|
||||||
|
echo "::set-output name=any_changed::false"
|
||||||
|
else
|
||||||
|
echo "any_changed=false" >> "$GITHUB_OUTPUT"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
OTHER_CHANGED=""
|
OTHER_CHANGED=""
|
||||||
@@ -156,19 +164,38 @@ else
|
|||||||
|
|
||||||
if [[ -n "${OTHER_CHANGED}" && "${OTHER_CHANGED}" != "[]" ]]; then
|
if [[ -n "${OTHER_CHANGED}" && "${OTHER_CHANGED}" != "[]" ]]; then
|
||||||
echo "::debug::Non Matching changed files: ${OTHER_CHANGED}"
|
echo "::debug::Non Matching changed files: ${OTHER_CHANGED}"
|
||||||
echo "::set-output name=only_changed::false"
|
|
||||||
echo "::set-output name=other_changed_files::$OTHER_CHANGED"
|
if [[ -z "$GITHUB_OUTPUT" ]]; then
|
||||||
|
echo "::set-output name=only_changed::false"
|
||||||
|
echo "::set-output name=other_changed_files::$OTHER_CHANGED"
|
||||||
|
else
|
||||||
|
echo "only_changed=false" >> "$GITHUB_OUTPUT"
|
||||||
|
echo "other_changed_files=$OTHER_CHANGED" >> "$GITHUB_OUTPUT"
|
||||||
|
fi
|
||||||
|
|
||||||
elif [[ -n "${ALL_CHANGED}" ]]; then
|
elif [[ -n "${ALL_CHANGED}" ]]; then
|
||||||
echo "::set-output name=only_changed::true"
|
if [[ -z "$GITHUB_OUTPUT" ]]; then
|
||||||
|
echo "::set-output name=only_changed::true"
|
||||||
|
else
|
||||||
|
echo "only_changed=true" >> "$GITHUB_OUTPUT"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ALL_OTHER_MODIFIED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" "ACMRD" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
ALL_OTHER_MODIFIED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" "ACMRD" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
|
|
||||||
if [[ -n "${ALL_MODIFIED}" ]]; then
|
if [[ -n "${ALL_MODIFIED}" ]]; then
|
||||||
echo "::debug::Matching modified files: ${ALL_MODIFIED}"
|
echo "::debug::Matching modified files: ${ALL_MODIFIED}"
|
||||||
echo "::set-output name=any_modified::true"
|
if [[ -z "$GITHUB_OUTPUT" ]]; then
|
||||||
|
echo "::set-output name=any_modified::true"
|
||||||
|
else
|
||||||
|
echo "any_modified=true" >> "$GITHUB_OUTPUT"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo "::set-output name=any_modified::false"
|
if [[ -z "$GITHUB_OUTPUT" ]]; then
|
||||||
|
echo "::set-output name=any_modified::false"
|
||||||
|
else
|
||||||
|
echo "any_modified=false" >> "$GITHUB_OUTPUT"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
OTHER_MODIFIED=""
|
OTHER_MODIFIED=""
|
||||||
@@ -189,19 +216,37 @@ else
|
|||||||
|
|
||||||
if [[ -n "${OTHER_MODIFIED}" && "$OTHER_MODIFIED" != "[]" ]]; then
|
if [[ -n "${OTHER_MODIFIED}" && "$OTHER_MODIFIED" != "[]" ]]; then
|
||||||
echo "::debug::Non Matching modified files: ${OTHER_MODIFIED}"
|
echo "::debug::Non Matching modified files: ${OTHER_MODIFIED}"
|
||||||
echo "::set-output name=only_modified::false"
|
|
||||||
echo "::set-output name=other_modified_files::$OTHER_MODIFIED"
|
if [[ -z "$GITHUB_OUTPUT" ]]; then
|
||||||
|
echo "::set-output name=only_modified::false"
|
||||||
|
echo "::set-output name=other_modified_files::$OTHER_MODIFIED"
|
||||||
|
else
|
||||||
|
echo "only_modified=false" >> "$GITHUB_OUTPUT"
|
||||||
|
echo "other_modified_files=$OTHER_MODIFIED" >> "$GITHUB_OUTPUT"
|
||||||
|
fi
|
||||||
elif [[ -n "${ALL_MODIFIED}" ]]; then
|
elif [[ -n "${ALL_MODIFIED}" ]]; then
|
||||||
echo "::set-output name=only_modified::true"
|
if [[ -z "$GITHUB_OUTPUT" ]]; then
|
||||||
|
echo "::set-output name=only_modified::true"
|
||||||
|
else
|
||||||
|
echo "only_modified=true" >> "$GITHUB_OUTPUT"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ALL_OTHER_DELETED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" D | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
ALL_OTHER_DELETED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" D | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
|
|
||||||
if [[ -n "${DELETED}" ]]; then
|
if [[ -n "${DELETED}" ]]; then
|
||||||
echo "::debug::Matching deleted files: ${DELETED}"
|
echo "::debug::Matching deleted files: ${DELETED}"
|
||||||
echo "::set-output name=any_deleted::true"
|
if [[ -z "$GITHUB_OUTPUT" ]]; then
|
||||||
|
echo "::set-output name=any_deleted::true"
|
||||||
|
else
|
||||||
|
echo "any_deleted=true" >> "$GITHUB_OUTPUT"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo "::set-output name=any_deleted::false"
|
if [[ -z "$GITHUB_OUTPUT" ]]; then
|
||||||
|
echo "::set-output name=any_deleted::false"
|
||||||
|
else
|
||||||
|
echo "any_deleted=false" >> "$GITHUB_OUTPUT"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
OTHER_DELETED=""
|
OTHER_DELETED=""
|
||||||
@@ -222,10 +267,19 @@ else
|
|||||||
|
|
||||||
if [[ -n "${OTHER_DELETED}" && "${OTHER_DELETED}" != "[]" ]]; then
|
if [[ -n "${OTHER_DELETED}" && "${OTHER_DELETED}" != "[]" ]]; then
|
||||||
echo "::debug::Non Matching deleted files: ${OTHER_DELETED}"
|
echo "::debug::Non Matching deleted files: ${OTHER_DELETED}"
|
||||||
echo "::set-output name=only_deleted::false"
|
if [[ -z "$GITHUB_OUTPUT" ]]; then
|
||||||
echo "::set-output name=other_deleted_files::$OTHER_DELETED"
|
echo "::set-output name=only_deleted::false"
|
||||||
|
echo "::set-output name=other_deleted_files::$OTHER_DELETED"
|
||||||
|
else
|
||||||
|
echo "only_deleted=false" >> "$GITHUB_OUTPUT"
|
||||||
|
echo "other_deleted_files=$OTHER_DELETED" >> "$GITHUB_OUTPUT"
|
||||||
|
fi
|
||||||
elif [[ -n "${DELETED}" ]]; then
|
elif [[ -n "${DELETED}" ]]; then
|
||||||
echo "::set-output name=only_deleted::true"
|
if [[ -z "$GITHUB_OUTPUT" ]]; then
|
||||||
|
echo "::set-output name=only_deleted::true"
|
||||||
|
else
|
||||||
|
echo "only_deleted=true" >> "$GITHUB_OUTPUT"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
if [[ "$INPUT_JSON" == "false" ]]; then
|
if [[ "$INPUT_JSON" == "false" ]]; then
|
||||||
ADDED=$(echo "${ADDED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
ADDED=$(echo "${ADDED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
@@ -269,19 +323,40 @@ if [[ $INPUT_INCLUDE_ALL_OLD_NEW_RENAMED_FILES == "true" ]]; then
|
|||||||
echo "::debug::All old & new renamed files: $ALL_OLD_NEW_RENAMED"
|
echo "::debug::All old & new renamed files: $ALL_OLD_NEW_RENAMED"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "::set-output name=added_files::$ADDED"
|
if [[ -z "$GITHUB_OUTPUT" ]]; then
|
||||||
echo "::set-output name=copied_files::$COPIED"
|
echo "::set-output name=added_files::$ADDED"
|
||||||
echo "::set-output name=deleted_files::$DELETED"
|
echo "::set-output name=copied_files::$COPIED"
|
||||||
echo "::set-output name=modified_files::$MODIFIED"
|
echo "::set-output name=deleted_files::$DELETED"
|
||||||
echo "::set-output name=renamed_files::$RENAMED"
|
echo "::set-output name=modified_files::$MODIFIED"
|
||||||
echo "::set-output name=type_changed_files::$TYPE_CHANGED"
|
echo "::set-output name=renamed_files::$RENAMED"
|
||||||
echo "::set-output name=unmerged_files::$UNMERGED"
|
echo "::set-output name=type_changed_files::$TYPE_CHANGED"
|
||||||
echo "::set-output name=unknown_files::$UNKNOWN"
|
echo "::set-output name=unmerged_files::$UNMERGED"
|
||||||
echo "::set-output name=all_changed_and_modified_files::$ALL_CHANGED_AND_MODIFIED"
|
echo "::set-output name=unknown_files::$UNKNOWN"
|
||||||
echo "::set-output name=all_changed_files::$ALL_CHANGED"
|
echo "::set-output name=all_changed_and_modified_files::$ALL_CHANGED_AND_MODIFIED"
|
||||||
echo "::set-output name=all_modified_files::$ALL_MODIFIED"
|
echo "::set-output name=all_changed_files::$ALL_CHANGED"
|
||||||
|
echo "::set-output name=all_modified_files::$ALL_MODIFIED"
|
||||||
|
else
|
||||||
|
cat <<EOF >> "$GITHUB_OUTPUT"
|
||||||
|
added_files=$ADDED
|
||||||
|
copied_files=$COPIED
|
||||||
|
deleted_files=$DELETED
|
||||||
|
modified_files=$MODIFIED
|
||||||
|
renamed_files=$RENAMED
|
||||||
|
type_changed_files=$TYPE_CHANGED
|
||||||
|
unmerged_files=$UNMERGED
|
||||||
|
unknown_files=$UNKNOWN
|
||||||
|
all_changed_and_modified_files=$ALL_CHANGED_AND_MODIFIED
|
||||||
|
all_changed_files=$ALL_CHANGED
|
||||||
|
all_modified_files=$ALL_MODIFIED
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ $INPUT_INCLUDE_ALL_OLD_NEW_RENAMED_FILES == "true" ]]; then
|
if [[ $INPUT_INCLUDE_ALL_OLD_NEW_RENAMED_FILES == "true" ]]; then
|
||||||
echo "::set-output name=all_old_new_renamed_files::$ALL_OLD_NEW_RENAMED"
|
if [[ -z "$GITHUB_OUTPUT" ]]; then
|
||||||
|
echo "::set-output name=all_old_new_renamed_files::$ALL_OLD_NEW_RENAMED"
|
||||||
|
else
|
||||||
|
echo "all_old_new_renamed_files=$ALL_OLD_NEW_RENAMED" >> "$GITHUB_OUTPUT"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
|
|||||||
24
get-sha.sh
24
get-sha.sh
@@ -1,24 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -eu
|
|
||||||
|
|
||||||
if [[ -n $INPUT_PATH ]]; then
|
|
||||||
REPO_DIR="$GITHUB_WORKSPACE/$INPUT_PATH"
|
|
||||||
|
|
||||||
echo "Resolving repository path: $REPO_DIR"
|
|
||||||
if [[ ! -d "$REPO_DIR" ]]; then
|
|
||||||
echo "::error::Invalid repository path: $REPO_DIR"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
cd "$REPO_DIR"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -n "$INPUT_UNTIL" ]]; then
|
|
||||||
SHA=$(git log -1 --format="%H" --date=local --until="$INPUT_UNTIL")
|
|
||||||
if [[ -z "$SHA" ]]; then
|
|
||||||
echo "::warning::The SHA for date '$INPUT_UNTIL' couldn't be determined, falling back to the current sha."
|
|
||||||
fi
|
|
||||||
echo "::set-output name=sha::$SHA"
|
|
||||||
else
|
|
||||||
echo "::set-output name=sha::$INPUT_SHA"
|
|
||||||
fi
|
|
||||||
@@ -1 +1 @@
|
|||||||
This is a test file
|
This is a test file.
|
||||||
|
|||||||
Reference in New Issue
Block a user