Deduplicate from files parameter without sorting (#321)

Co-authored-by: Tonye Jack <jtonye@ymail.com>
This commit is contained in:
Masaya Suzuki
2022-01-25 10:50:47 +09:00
committed by GitHub
parent 7fe764fa81
commit 13328439bc
4 changed files with 52 additions and 7 deletions

View File

@@ -222,11 +222,20 @@ jobs:
files: |
.github/workflows/test.yml
action.yml
test/changed-files-list.txt
!**/*.txt
- name: Show output
run: |
echo '${{ toJSON(steps.changed-files-specific.outputs) }}'
shell:
bash
- 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')"
run: |
echo "Invalid output: Expected not to include (test/changed-files-list.txt) got (${{ steps.changed-files-specific.outputs.all_changed_files }})"
exit 1
shell:
bash
- 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')"
run: |
@@ -236,6 +245,13 @@ jobs:
fi
shell:
bash
- 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')"
run: |
echo "Invalid output: Expected not to include (test/changed-files-list.txt) got (${{ steps.changed-files-specific.outputs.all_modified_files }})"
exit 1
shell:
bash
- 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')"
run: |
@@ -245,6 +261,13 @@ jobs:
fi
shell:
bash
- 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')"
run: |
echo "Invalid output: Expected not to include (test/changed-files-list.txt) got (${{ steps.changed-files-specific.outputs.deleted_files }})"
exit 1
shell:
bash
- 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')"
run: |
@@ -426,6 +449,13 @@ jobs:
test/changed-files-list.txt
files: |
**/workflows/rebase.yml
- 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')
run: |
echo "Invalid output: Expected not to include (test/changed-files-list.txt) got (${{ steps.changed-files-specific-source-file.outputs.all_changed_files }})"
exit 1
shell:
bash
- name: Verify any_changed from source files
if: |
(
@@ -440,6 +470,13 @@ jobs:
fi
shell:
bash
- 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')
run: |
echo "Invalid output: Expected not to include (test/changed-files-list.txt) got (${{ steps.changed-files-specific-source-file.outputs.all_modified_files }})"
exit 1
shell:
bash
- name: Verify any_modified from source files
if: |
(
@@ -454,6 +491,13 @@ jobs:
fi
shell:
bash
- 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')
run: |
echo "Invalid output: Expected not to include (test/changed-files-list.txt) got (${{ steps.changed-files-specific-source-file.outputs.deleted_files }})"
exit 1
shell:
bash
- 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')"
run: |