Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a05436ffa9 | ||
|
|
20f6f68d34 | ||
|
|
b94745bfeb | ||
|
|
00cfbecfee |
42
.github/workflows/test.yml
vendored
42
.github/workflows/test.yml
vendored
@@ -222,22 +222,22 @@ jobs:
|
|||||||
files: |
|
files: |
|
||||||
.github/workflows/test.yml
|
.github/workflows/test.yml
|
||||||
action.yml
|
action.yml
|
||||||
test/changed-files-list.txt
|
**/test.txt
|
||||||
!**/*.txt
|
!test/test/test.txt
|
||||||
- name: Show output
|
- name: Show output
|
||||||
run: |
|
run: |
|
||||||
echo '${{ toJSON(steps.changed-files-specific.outputs) }}'
|
echo '${{ toJSON(steps.changed-files-specific.outputs) }}'
|
||||||
shell:
|
shell:
|
||||||
bash
|
bash
|
||||||
- name: Check if a excluded file is not included in any_changed
|
- name: Check if a excluded file is not included in any_changed
|
||||||
if: "contains(steps.changed-files-specific.outputs.all_changed_files, 'test/changed-files-list.txt')"
|
if: "contains(steps.changed-files-specific.outputs.all_changed_files, 'test/test/test.txt')"
|
||||||
run: |
|
run: |
|
||||||
echo "Invalid output: Expected not to include (test/changed-files-list.txt) got (${{ steps.changed-files-specific.outputs.all_changed_files }})"
|
echo "Invalid output: Expected not to include (test/test/test.txt) got (${{ steps.changed-files-specific.outputs.all_changed_files }})"
|
||||||
exit 1
|
exit 1
|
||||||
shell:
|
shell:
|
||||||
bash
|
bash
|
||||||
- name: Verify any_changed for specific files
|
- name: Verify any_changed for specific files
|
||||||
if: "!contains(steps.changed-files-specific.outputs.all_changed_files, 'action.yml') && !contains(steps.changed-files-specific.outputs.all_changed_files, '.github/workflows/test.yml')"
|
if: "!contains(steps.changed-files-specific.outputs.all_changed_files, 'action.yml') && !contains(steps.changed-files-specific.outputs.all_changed_files, '.github/workflows/test.yml') && !contains(steps.changed-files-specific.outputs.all_changed_files, 'test/test.txt')"
|
||||||
run: |
|
run: |
|
||||||
if [[ "${{ steps.changed-files-specific.outputs.any_changed }}" != "false" ]]; then
|
if [[ "${{ steps.changed-files-specific.outputs.any_changed }}" != "false" ]]; then
|
||||||
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific.outputs.any_changed }})"
|
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific.outputs.any_changed }})"
|
||||||
@@ -246,14 +246,14 @@ jobs:
|
|||||||
shell:
|
shell:
|
||||||
bash
|
bash
|
||||||
- name: Check if a excluded file is not included in any_modified
|
- name: Check if a excluded file is not included in any_modified
|
||||||
if: "contains(steps.changed-files-specific.outputs.all_modified_files, 'test/changed-files-list.txt')"
|
if: "contains(steps.changed-files-specific.outputs.all_modified_files, 'test/test/test.txt')"
|
||||||
run: |
|
run: |
|
||||||
echo "Invalid output: Expected not to include (test/changed-files-list.txt) got (${{ steps.changed-files-specific.outputs.all_modified_files }})"
|
echo "Invalid output: Expected not to include (test/test/test.txt) got (${{ steps.changed-files-specific.outputs.all_modified_files }})"
|
||||||
exit 1
|
exit 1
|
||||||
shell:
|
shell:
|
||||||
bash
|
bash
|
||||||
- name: Verify any_modified for specific files
|
- name: Verify any_modified for specific files
|
||||||
if: "!contains(steps.changed-files-specific.outputs.all_modified_files, 'action.yml') && !contains(steps.changed-files-specific.outputs.all_modified_files, '.github/workflows/test.yml')"
|
if: "!contains(steps.changed-files-specific.outputs.all_modified_files, 'action.yml') && !contains(steps.changed-files-specific.outputs.all_modified_files, '.github/workflows/test.yml') && !contains(steps.changed-files-specific.outputs.all_modified_files, 'test/test.txt')"
|
||||||
run: |
|
run: |
|
||||||
if [[ "${{ steps.changed-files-specific.outputs.any_modified }}" != "false" ]]; then
|
if [[ "${{ steps.changed-files-specific.outputs.any_modified }}" != "false" ]]; then
|
||||||
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific.outputs.any_modified }})"
|
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific.outputs.any_modified }})"
|
||||||
@@ -262,14 +262,14 @@ jobs:
|
|||||||
shell:
|
shell:
|
||||||
bash
|
bash
|
||||||
- name: Check if a excluded file is not included in any_deleted
|
- name: Check if a excluded file is not included in any_deleted
|
||||||
if: "contains(steps.changed-files-specific.outputs.deleted_files, 'test/changed-files-list.txt')"
|
if: "contains(steps.changed-files-specific.outputs.deleted_files, 'test/test/test.txt')"
|
||||||
run: |
|
run: |
|
||||||
echo "Invalid output: Expected not to include (test/changed-files-list.txt) got (${{ steps.changed-files-specific.outputs.deleted_files }})"
|
echo "Invalid output: Expected not to include (test/test/test.txt) got (${{ steps.changed-files-specific.outputs.deleted_files }})"
|
||||||
exit 1
|
exit 1
|
||||||
shell:
|
shell:
|
||||||
bash
|
bash
|
||||||
- name: Verify any_deleted for specific files
|
- name: Verify any_deleted for specific files
|
||||||
if: "!contains(steps.changed-files-specific.outputs.deleted_files, 'action.yml') && !contains(steps.changed-files-specific.outputs.deleted_files, '.github/workflows/test.yml')"
|
if: "!contains(steps.changed-files-specific.outputs.deleted_files, 'action.yml') && !contains(steps.changed-files-specific.outputs.deleted_files, '.github/workflows/test.yml') && !contains(steps.changed-files-specific.outputs.deleted_files, 'test/test.txt')"
|
||||||
run: |
|
run: |
|
||||||
if [[ "${{ steps.changed-files-specific.outputs.any_deleted }}" != "false" ]]; then
|
if [[ "${{ steps.changed-files-specific.outputs.any_deleted }}" != "false" ]]; then
|
||||||
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific.outputs.any_deleted }})"
|
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific.outputs.any_deleted }})"
|
||||||
@@ -450,9 +450,9 @@ jobs:
|
|||||||
files: |
|
files: |
|
||||||
**/workflows/rebase.yml
|
**/workflows/rebase.yml
|
||||||
- name: Check if a excluded file is not included in any_changed
|
- name: Check if a excluded file is not included in any_changed
|
||||||
if: contains(steps.changed-files-specific-source-file.outputs.all_changed_files, 'test/changed-files-list.txt')
|
if: contains(steps.changed-files-specific-source-file.outputs.all_changed_files, 'test/test/test.txt')
|
||||||
run: |
|
run: |
|
||||||
echo "Invalid output: Expected not to include (test/changed-files-list.txt) got (${{ steps.changed-files-specific-source-file.outputs.all_changed_files }})"
|
echo "Invalid output: Expected not to include (test/test/test.txt) got (${{ steps.changed-files-specific-source-file.outputs.all_changed_files }})"
|
||||||
exit 1
|
exit 1
|
||||||
shell:
|
shell:
|
||||||
bash
|
bash
|
||||||
@@ -461,7 +461,8 @@ jobs:
|
|||||||
(
|
(
|
||||||
!contains(steps.changed-files-specific-source-file.outputs.all_changed_files, 'action.yml') &&
|
!contains(steps.changed-files-specific-source-file.outputs.all_changed_files, 'action.yml') &&
|
||||||
!contains(steps.changed-files-specific-source-file.outputs.all_changed_files, '.github/workflows/test.yml') &&
|
!contains(steps.changed-files-specific-source-file.outputs.all_changed_files, '.github/workflows/test.yml') &&
|
||||||
!contains(steps.changed-files-specific-source-file.outputs.all_changed_files, '.github/workflows/rebase.yml')
|
!contains(steps.changed-files-specific-source-file.outputs.all_changed_files, '.github/workflows/rebase.yml') &&
|
||||||
|
!contains(steps.changed-files-specific-source-file.outputs.all_changed_files, 'test/test.txt')
|
||||||
)
|
)
|
||||||
run: |
|
run: |
|
||||||
if [[ "${{ steps.changed-files-specific-source-file.outputs.any_changed }}" != "false" ]]; then
|
if [[ "${{ steps.changed-files-specific-source-file.outputs.any_changed }}" != "false" ]]; then
|
||||||
@@ -471,9 +472,9 @@ jobs:
|
|||||||
shell:
|
shell:
|
||||||
bash
|
bash
|
||||||
- name: Check if a excluded file is not included in any_modified
|
- name: Check if a excluded file is not included in any_modified
|
||||||
if: contains(steps.changed-files-specific-source-file.outputs.all_modified_files, 'test/changed-files-list.txt')
|
if: contains(steps.changed-files-specific-source-file.outputs.all_modified_files, 'test/test/test.txt')
|
||||||
run: |
|
run: |
|
||||||
echo "Invalid output: Expected not to include (test/changed-files-list.txt) got (${{ steps.changed-files-specific-source-file.outputs.all_modified_files }})"
|
echo "Invalid output: Expected not to include (test/test/test.txt) got (${{ steps.changed-files-specific-source-file.outputs.all_modified_files }})"
|
||||||
exit 1
|
exit 1
|
||||||
shell:
|
shell:
|
||||||
bash
|
bash
|
||||||
@@ -482,7 +483,8 @@ jobs:
|
|||||||
(
|
(
|
||||||
!contains(steps.changed-files-specific-source-file.outputs.all_modified_files, 'action.yml') &&
|
!contains(steps.changed-files-specific-source-file.outputs.all_modified_files, 'action.yml') &&
|
||||||
!contains(steps.changed-files-specific-source-file.outputs.all_modified_files, '.github/workflows/test.yml') &&
|
!contains(steps.changed-files-specific-source-file.outputs.all_modified_files, '.github/workflows/test.yml') &&
|
||||||
!contains(steps.changed-files-specific-source-file.outputs.all_modified_files, '.github/workflows/rebase.yml')
|
!contains(steps.changed-files-specific-source-file.outputs.all_modified_files, '.github/workflows/rebase.yml') &&
|
||||||
|
!contains(steps.changed-files-specific-source-file.outputs.all_modified_files, 'test/test.txt')
|
||||||
)
|
)
|
||||||
run: |
|
run: |
|
||||||
if [[ "${{ steps.changed-files-specific-source-file.outputs.any_modified }}" != "false" ]]; then
|
if [[ "${{ steps.changed-files-specific-source-file.outputs.any_modified }}" != "false" ]]; then
|
||||||
@@ -492,14 +494,14 @@ jobs:
|
|||||||
shell:
|
shell:
|
||||||
bash
|
bash
|
||||||
- name: Check if a excluded file is not included in any_deleted
|
- name: Check if a excluded file is not included in any_deleted
|
||||||
if: contains(steps.changed-files-specific-source-file.outputs.deleted_files, 'test/changed-files-list.txt')
|
if: contains(steps.changed-files-specific-source-file.outputs.deleted_files, 'test/test/test.txt')
|
||||||
run: |
|
run: |
|
||||||
echo "Invalid output: Expected not to include (test/changed-files-list.txt) got (${{ steps.changed-files-specific-source-file.outputs.deleted_files }})"
|
echo "Invalid output: Expected not to include (test/test/test.txt) got (${{ steps.changed-files-specific-source-file.outputs.deleted_files }})"
|
||||||
exit 1
|
exit 1
|
||||||
shell:
|
shell:
|
||||||
bash
|
bash
|
||||||
- name: Verify any_deleted from source files
|
- name: Verify any_deleted from source files
|
||||||
if: "!contains(steps.changed-files-specific-source-file.outputs.deleted_files, 'action.yml') && !contains(steps.changed-files-specific-source-file.outputs.deleted_files, '.github/workflows/test.yml')"
|
if: "!contains(steps.changed-files-specific-source-file.outputs.deleted_files, 'action.yml') && !contains(steps.changed-files-specific-source-file.outputs.deleted_files, '.github/workflows/test.yml') && !contains(steps.changed-files-specific-source-file.outputs.deleted_files, 'test/test.txt')"
|
||||||
run: |
|
run: |
|
||||||
if [[ "${{ steps.changed-files-specific-source-file.outputs.any_deleted }}" != "false" ]]; then
|
if [[ "${{ steps.changed-files-specific-source-file.outputs.any_deleted }}" != "false" ]]; then
|
||||||
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-source-file.outputs.any_deleted }})"
|
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-source-file.outputs.any_deleted }})"
|
||||||
|
|||||||
32
HISTORY.md
32
HISTORY.md
@@ -1,5 +1,13 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [v13.2](https://github.com/tj-actions/changed-files/tree/v13.2) (2022-01-25)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v3.0.2...v13.2)
|
||||||
|
|
||||||
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
- Upgraded to v3.0.2 [\#324](https://github.com/tj-actions/changed-files/pull/324) ([jackton1](https://github.com/jackton1))
|
||||||
|
|
||||||
## [v3.0.2](https://github.com/tj-actions/changed-files/tree/v3.0.2) (2022-01-25)
|
## [v3.0.2](https://github.com/tj-actions/changed-files/tree/v3.0.2) (2022-01-25)
|
||||||
|
|
||||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v3.0.1...v3.0.2)
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v3.0.1...v3.0.2)
|
||||||
@@ -225,7 +233,7 @@
|
|||||||
|
|
||||||
## [v1.2.1](https://github.com/tj-actions/changed-files/tree/v1.2.1) (2021-11-08)
|
## [v1.2.1](https://github.com/tj-actions/changed-files/tree/v1.2.1) (2021-11-08)
|
||||||
|
|
||||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v11.5...v1.2.1)
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v1.2.0...v1.2.1)
|
||||||
|
|
||||||
**Implemented enhancements:**
|
**Implemented enhancements:**
|
||||||
|
|
||||||
@@ -239,13 +247,13 @@
|
|||||||
- Update actions/checkout action to v2.4.0 [\#243](https://github.com/tj-actions/changed-files/pull/243) ([renovate[bot]](https://github.com/apps/renovate))
|
- Update actions/checkout action to v2.4.0 [\#243](https://github.com/tj-actions/changed-files/pull/243) ([renovate[bot]](https://github.com/apps/renovate))
|
||||||
- Upgraded to v11.5 [\#241](https://github.com/tj-actions/changed-files/pull/241) ([jackton1](https://github.com/jackton1))
|
- Upgraded to v11.5 [\#241](https://github.com/tj-actions/changed-files/pull/241) ([jackton1](https://github.com/jackton1))
|
||||||
|
|
||||||
## [v11.5](https://github.com/tj-actions/changed-files/tree/v11.5) (2021-10-30)
|
|
||||||
|
|
||||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v1.2.0...v11.5)
|
|
||||||
|
|
||||||
## [v1.2.0](https://github.com/tj-actions/changed-files/tree/v1.2.0) (2021-10-30)
|
## [v1.2.0](https://github.com/tj-actions/changed-files/tree/v1.2.0) (2021-10-30)
|
||||||
|
|
||||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v11.4...v1.2.0)
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v11.5...v1.2.0)
|
||||||
|
|
||||||
|
## [v11.5](https://github.com/tj-actions/changed-files/tree/v11.5) (2021-10-30)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v11.4...v11.5)
|
||||||
|
|
||||||
**Merged pull requests:**
|
**Merged pull requests:**
|
||||||
|
|
||||||
@@ -658,7 +666,7 @@
|
|||||||
|
|
||||||
## [v7](https://github.com/tj-actions/changed-files/tree/v7) (2021-06-09)
|
## [v7](https://github.com/tj-actions/changed-files/tree/v7) (2021-06-09)
|
||||||
|
|
||||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v6...v7)
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v6.3...v7)
|
||||||
|
|
||||||
**Closed issues:**
|
**Closed issues:**
|
||||||
|
|
||||||
@@ -674,13 +682,13 @@
|
|||||||
- Update tj-actions/sync-release-version action to v8.7 [\#86](https://github.com/tj-actions/changed-files/pull/86) ([renovate[bot]](https://github.com/apps/renovate))
|
- Update tj-actions/sync-release-version action to v8.7 [\#86](https://github.com/tj-actions/changed-files/pull/86) ([renovate[bot]](https://github.com/apps/renovate))
|
||||||
- Upgraded to v6.3 [\#85](https://github.com/tj-actions/changed-files/pull/85) ([jackton1](https://github.com/jackton1))
|
- Upgraded to v6.3 [\#85](https://github.com/tj-actions/changed-files/pull/85) ([jackton1](https://github.com/jackton1))
|
||||||
|
|
||||||
## [v6](https://github.com/tj-actions/changed-files/tree/v6) (2021-05-26)
|
|
||||||
|
|
||||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v6.3...v6)
|
|
||||||
|
|
||||||
## [v6.3](https://github.com/tj-actions/changed-files/tree/v6.3) (2021-05-26)
|
## [v6.3](https://github.com/tj-actions/changed-files/tree/v6.3) (2021-05-26)
|
||||||
|
|
||||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v6.2...v6.3)
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v6...v6.3)
|
||||||
|
|
||||||
|
## [v6](https://github.com/tj-actions/changed-files/tree/v6) (2021-05-26)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v6.2...v6)
|
||||||
|
|
||||||
**Merged pull requests:**
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
|||||||
20
README.md
20
README.md
@@ -64,7 +64,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Get changed files
|
- name: Get changed files
|
||||||
id: changed-files
|
id: changed-files
|
||||||
uses: tj-actions/changed-files@v3.0.2
|
uses: tj-actions/changed-files@v13.2
|
||||||
|
|
||||||
- name: List all changed files
|
- name: List all changed files
|
||||||
run: |
|
run: |
|
||||||
@@ -141,11 +141,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@v3.0.2
|
uses: tj-actions/changed-files@v13.2
|
||||||
|
|
||||||
- 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@v3.0.2
|
uses: tj-actions/changed-files@v13.2
|
||||||
with:
|
with:
|
||||||
separator: ","
|
separator: ","
|
||||||
|
|
||||||
@@ -167,7 +167,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@v3.0.2
|
uses: tj-actions/changed-files@v13.2
|
||||||
with:
|
with:
|
||||||
files: |
|
files: |
|
||||||
my-file.txt
|
my-file.txt
|
||||||
@@ -206,14 +206,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@v3.0.2
|
uses: tj-actions/changed-files@v13.2
|
||||||
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@v3.0.2
|
uses: tj-actions/changed-files@v13.2
|
||||||
with:
|
with:
|
||||||
files_from_source_file: |
|
files_from_source_file: |
|
||||||
test/changed-files-list.txt
|
test/changed-files-list.txt
|
||||||
@@ -222,13 +222,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@v3.0.2
|
uses: tj-actions/changed-files@v13.2
|
||||||
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@v3.0.2
|
uses: tj-actions/changed-files@v13.2
|
||||||
with:
|
with:
|
||||||
base_sha: "2096ed0"
|
base_sha: "2096ed0"
|
||||||
|
|
||||||
@@ -240,7 +240,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@v3.0.2
|
uses: tj-actions/changed-files@v13.2
|
||||||
with:
|
with:
|
||||||
path: dir1
|
path: dir1
|
||||||
|
|
||||||
@@ -252,7 +252,7 @@ Support this project with a :star:
|
|||||||
|
|
||||||
- name: Run changed-files using the last commit on the remote branch
|
- name: Run changed-files using the last commit on the remote branch
|
||||||
id: changed-files-since-last-remote-commit
|
id: changed-files-since-last-remote-commit
|
||||||
uses: tj-actions/changed-files@v3.0.2
|
uses: tj-actions/changed-files@v13.2
|
||||||
with:
|
with:
|
||||||
since_last_remote_commit: "true"
|
since_last_remote_commit: "true"
|
||||||
|
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ runs:
|
|||||||
INPUT_SHA: ${{ inputs.sha }}
|
INPUT_SHA: ${{ inputs.sha }}
|
||||||
INPUT_BASE_SHA: ${{ steps.base-sha.outputs.base_sha }}
|
INPUT_BASE_SHA: ${{ steps.base-sha.outputs.base_sha }}
|
||||||
INPUT_TOKEN: ${{ inputs.token }}
|
INPUT_TOKEN: ${{ inputs.token }}
|
||||||
INPUT_FILES: ${{ steps.glob.outputs.paths }}
|
INPUT_FILES_PATTERN: ${{ steps.glob.outputs.paths }}
|
||||||
INPUT_SEPARATOR: ${{ inputs.separator }}
|
INPUT_SEPARATOR: ${{ inputs.separator }}
|
||||||
INPUT_PATH: ${{ inputs.path }}
|
INPUT_PATH: ${{ inputs.path }}
|
||||||
|
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ echo "Retrieving changes between $PREVIOUS_SHA ($TARGET_BRANCH) → $CURRENT_SHA
|
|||||||
|
|
||||||
echo "Getting diff..."
|
echo "Getting diff..."
|
||||||
|
|
||||||
if [[ -z "${INPUT_FILES[*]}" ]]; then
|
if [[ -z "$INPUT_FILES_PATTERN" ]]; then
|
||||||
ADDED=$(git diff --diff-filter=A --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
ADDED=$(git diff --diff-filter=A --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
COPIED=$(git diff --diff-filter=C --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
COPIED=$(git diff --diff-filter=C --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
DELETED=$(git diff --diff-filter=D --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
DELETED=$(git diff --diff-filter=D --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
@@ -106,19 +106,19 @@ if [[ -z "${INPUT_FILES[*]}" ]]; then
|
|||||||
ALL_CHANGED=$(git diff --diff-filter="ACMR" --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
ALL_CHANGED=$(git diff --diff-filter="ACMR" --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
ALL_MODIFIED=$(git diff --diff-filter="ACMRD" --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
ALL_MODIFIED=$(git diff --diff-filter="ACMRD" --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
else
|
else
|
||||||
echo "Input files: $INPUT_FILES"
|
echo "Input files pattern: $INPUT_FILES_PATTERN"
|
||||||
|
|
||||||
ADDED=$(git diff --diff-filter=A --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | grep -E "(${INPUT_FILES})" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
ADDED=$(git diff --diff-filter=A --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | grep -x "$INPUT_FILES_PATTERN" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
COPIED=$(git diff --diff-filter=C --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | grep -E "(${INPUT_FILES})" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
COPIED=$(git diff --diff-filter=C --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | grep -x "$INPUT_FILES_PATTERN" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
DELETED=$(git diff --diff-filter=D --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | grep -E "(${INPUT_FILES})" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
DELETED=$(git diff --diff-filter=D --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | grep -x "$INPUT_FILES_PATTERN" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
MODIFIED=$(git diff --diff-filter=M --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | grep -E "(${INPUT_FILES})" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
MODIFIED=$(git diff --diff-filter=M --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | grep -x "$INPUT_FILES_PATTERN" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
RENAMED=$(git diff --diff-filter=R --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | grep -E "(${INPUT_FILES})" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
RENAMED=$(git diff --diff-filter=R --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | grep -x "$INPUT_FILES_PATTERN" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
TYPE_CHANGED=$(git diff --diff-filter=T --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | grep -E "(${INPUT_FILES})" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
TYPE_CHANGED=$(git diff --diff-filter=T --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | grep -x "$INPUT_FILES_PATTERN" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
UNMERGED=$(git diff --diff-filter=U --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | grep -E "(${INPUT_FILES})" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
UNMERGED=$(git diff --diff-filter=U --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | grep -x "$INPUT_FILES_PATTERN" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
UNKNOWN=$(git diff --diff-filter=X --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | grep -E "(${INPUT_FILES})" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
UNKNOWN=$(git diff --diff-filter=X --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | grep -x "$INPUT_FILES_PATTERN" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
ALL_CHANGED_AND_MODIFIED=$(git diff --diff-filter="*ACDMRTUX" --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | grep -E "(${INPUT_FILES})" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
ALL_CHANGED_AND_MODIFIED=$(git diff --diff-filter="*ACDMRTUX" --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | grep -x "$INPUT_FILES_PATTERN" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
ALL_CHANGED=$(git diff --diff-filter="ACMR" --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | grep -E "(${INPUT_FILES})" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
ALL_CHANGED=$(git diff --diff-filter="ACMR" --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | grep -x "$INPUT_FILES_PATTERN" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
ALL_MODIFIED=$(git diff --diff-filter="ACMRD" --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | grep -E "(${INPUT_FILES})" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
ALL_MODIFIED=$(git diff --diff-filter="ACMRD" --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | grep -x "$INPUT_FILES_PATTERN" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
|
|
||||||
ALL_OTHER_CHANGED=$(git diff --diff-filter="ACMR" --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
ALL_OTHER_CHANGED=$(git diff --diff-filter="ACMR" --name-only "$PREVIOUS_SHA" "$CURRENT_SHA" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
UNIQUE_ALL_CHANGED=$(echo "${ALL_CHANGED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk '!a[$0]++' | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
UNIQUE_ALL_CHANGED=$(echo "${ALL_CHANGED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk '!a[$0]++' | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
|
|||||||
@@ -2,5 +2,5 @@
|
|||||||
action.yml
|
action.yml
|
||||||
action.yml
|
action.yml
|
||||||
action.yml
|
action.yml
|
||||||
test/changed-files-list.txt
|
**/test.txt
|
||||||
!**/*.txt
|
!test/test/test.txt
|
||||||
|
|||||||
1
test/test.txt
Normal file
1
test/test.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
This is a test file
|
||||||
1
test/test/test.txt
Normal file
1
test/test/test.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
This is a test file
|
||||||
Reference in New Issue
Block a user