2021-03-04 21:36:52 -05:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
on:
|
2021-04-23 06:14:21 -04:00
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
2021-03-04 21:36:52 -05:00
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
|
|
|
|
jobs:
|
2021-06-18 10:19:28 -04:00
|
|
|
shellcheck:
|
|
|
|
name: Run shellcheck
|
2021-05-25 00:30:19 -04:00
|
|
|
runs-on: ubuntu-latest
|
2021-06-18 10:19:28 -04:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout to branch
|
2022-03-01 19:50:35 +00:00
|
|
|
uses: actions/checkout@v3
|
2021-06-18 10:19:28 -04:00
|
|
|
- name: shellcheck
|
2022-04-21 15:19:27 +00:00
|
|
|
uses: reviewdog/action-shellcheck@v1.15
|
2022-02-16 02:49:49 -05:00
|
|
|
|
2022-02-17 02:35:49 -05:00
|
|
|
test-pull-requests-from-forks:
|
|
|
|
name: Test changed-files diff on pull_requests from forks
|
2022-02-16 02:49:49 -05:00
|
|
|
runs-on: ${{ matrix.platform }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
2022-03-16 01:38:55 -04:00
|
|
|
max-parallel: 4
|
2022-02-16 02:49:49 -05:00
|
|
|
matrix:
|
2022-03-16 02:08:10 -04:00
|
|
|
platform: [ubuntu-latest, windows-latest, macos-latest, macos-11, ubuntu-18.04, windows-2022]
|
2022-02-16 02:49:49 -05:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2022-03-01 19:50:35 +00:00
|
|
|
uses: actions/checkout@v3
|
2022-02-16 02:49:49 -05:00
|
|
|
with:
|
2022-02-23 10:39:20 +02:00
|
|
|
submodules: true
|
2022-02-16 02:49:49 -05:00
|
|
|
fetch-depth: 0
|
|
|
|
|
2022-02-17 02:35:49 -05:00
|
|
|
- name: Get changed files use_fork_point
|
|
|
|
id: changed-files-fork-point
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
use_fork_point: "true"
|
|
|
|
|
|
|
|
- name: Show output
|
|
|
|
run: |
|
|
|
|
echo '${{ toJSON(steps.changed-files-fork-point.outputs) }}'
|
|
|
|
shell:
|
|
|
|
bash
|
|
|
|
|
2022-02-16 02:49:49 -05:00
|
|
|
- name: Get changed files
|
|
|
|
id: changed-files
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
base_sha: ${{ github.event.pull_request.base.sha }}
|
|
|
|
|
|
|
|
- name: Show output
|
|
|
|
run: |
|
|
|
|
echo '${{ toJSON(steps.changed-files.outputs) }}'
|
|
|
|
shell:
|
|
|
|
bash
|
2021-06-18 10:19:28 -04:00
|
|
|
|
2021-08-28 04:53:03 +03:00
|
|
|
test-multiple-repositories:
|
|
|
|
name: Test with multiple repositories
|
|
|
|
runs-on: ${{ matrix.platform }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
2022-03-16 01:38:55 -04:00
|
|
|
max-parallel: 4
|
2021-08-28 04:53:03 +03:00
|
|
|
matrix:
|
2022-03-16 02:08:10 -04:00
|
|
|
platform: [ubuntu-latest, windows-latest, macos-latest, macos-11, ubuntu-18.04, windows-2022]
|
2021-08-28 04:53:03 +03:00
|
|
|
steps:
|
|
|
|
- name: Checkout into dir1
|
2022-03-01 19:50:35 +00:00
|
|
|
uses: actions/checkout@v3
|
2021-08-28 04:53:03 +03:00
|
|
|
with:
|
2022-02-23 10:39:20 +02:00
|
|
|
submodules: true
|
2021-08-28 04:53:03 +03:00
|
|
|
fetch-depth: 0
|
|
|
|
path: dir1
|
|
|
|
- name: Run changed-files with defaults on the dir1
|
|
|
|
id: changed-files-dir1
|
|
|
|
uses: ./dir1
|
|
|
|
with:
|
|
|
|
path: dir1
|
|
|
|
- name: Show output
|
|
|
|
run: |
|
2021-09-04 09:08:20 -04:00
|
|
|
echo '${{ toJSON(steps.changed-files-dir1.outputs) }}'
|
2021-08-28 04:53:03 +03:00
|
|
|
shell:
|
|
|
|
bash
|
|
|
|
- name: List all modified files
|
|
|
|
run: |
|
2021-10-12 09:47:12 -04:00
|
|
|
for file in ${{ steps.changed-files-dir1.outputs.modified_files }}; do
|
2021-09-04 09:08:20 -04:00
|
|
|
echo "$file"
|
2021-08-28 04:53:03 +03:00
|
|
|
done
|
|
|
|
shell:
|
|
|
|
bash
|
|
|
|
- name: Checkout into dir2
|
2022-03-01 19:50:35 +00:00
|
|
|
uses: actions/checkout@v3
|
2021-08-28 04:53:03 +03:00
|
|
|
with:
|
2022-02-23 10:39:20 +02:00
|
|
|
submodules: true
|
2021-08-28 04:53:03 +03:00
|
|
|
fetch-depth: 0
|
|
|
|
path: dir2
|
|
|
|
- name: Run changed-files with defaults on the dir2
|
|
|
|
id: changed-files-dir2
|
|
|
|
uses: ./dir2
|
|
|
|
with:
|
|
|
|
path: dir2
|
|
|
|
- name: Show output
|
|
|
|
run: |
|
2021-09-04 09:08:20 -04:00
|
|
|
echo '${{ toJSON(steps.changed-files-dir2.outputs) }}'
|
2021-08-28 04:53:03 +03:00
|
|
|
shell:
|
|
|
|
bash
|
|
|
|
- name: List all modified files
|
|
|
|
run: |
|
2021-10-12 09:47:12 -04:00
|
|
|
for file in ${{ steps.changed-files-dir2.outputs.modified_files }}; do
|
2021-09-04 09:08:20 -04:00
|
|
|
echo "$file"
|
2021-08-28 04:53:03 +03:00
|
|
|
done
|
|
|
|
shell:
|
|
|
|
bash
|
|
|
|
|
2021-12-04 06:11:27 -05:00
|
|
|
test-non-existent-base-sha:
|
|
|
|
name: Test changed-files non existent base sha
|
2021-06-18 10:19:28 -04:00
|
|
|
runs-on: ${{ matrix.platform }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
2022-03-16 01:38:55 -04:00
|
|
|
max-parallel: 4
|
2021-06-18 10:19:28 -04:00
|
|
|
matrix:
|
2022-03-16 02:08:10 -04:00
|
|
|
platform: [ubuntu-latest, windows-latest, macos-latest, macos-11, ubuntu-18.04, windows-2022]
|
2021-06-18 10:19:28 -04:00
|
|
|
|
2021-05-25 00:30:19 -04:00
|
|
|
steps:
|
|
|
|
- name: Checkout to branch
|
2022-03-01 19:50:35 +00:00
|
|
|
uses: actions/checkout@v3
|
2021-08-28 04:53:03 +03:00
|
|
|
|
2021-12-04 06:11:27 -05:00
|
|
|
- name: Run changed-files with non existent base sha
|
2021-05-25 00:30:19 -04:00
|
|
|
id: changed-files
|
2021-12-04 06:11:27 -05:00
|
|
|
uses: ./
|
2021-05-25 00:30:19 -04:00
|
|
|
continue-on-error: true
|
2021-12-04 06:11:27 -05:00
|
|
|
with:
|
|
|
|
base_sha: "4554456"
|
|
|
|
|
|
|
|
- name: Show output
|
|
|
|
run: |
|
|
|
|
echo "${{ toJSON(steps.changed-files.outputs) }}"
|
|
|
|
shell:
|
|
|
|
bash
|
|
|
|
|
|
|
|
- name: Run changed-files-specific with non existent base sha
|
|
|
|
id: changed-files-specific
|
2021-05-25 00:30:19 -04:00
|
|
|
uses: ./
|
2021-12-04 06:11:27 -05:00
|
|
|
continue-on-error: true
|
|
|
|
with:
|
|
|
|
files: action.yml
|
|
|
|
base_sha: "4554456"
|
|
|
|
|
|
|
|
- name: Show output
|
|
|
|
run: |
|
|
|
|
echo "${{ toJSON(steps.changed-files-specific.outputs) }}"
|
|
|
|
shell:
|
|
|
|
bash
|
|
|
|
|
|
|
|
test-non-existent-sha:
|
|
|
|
name: Test changed-files non existent sha
|
|
|
|
runs-on: ${{ matrix.platform }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
2022-03-16 01:38:55 -04:00
|
|
|
max-parallel: 4
|
2021-12-04 06:11:27 -05:00
|
|
|
matrix:
|
2022-03-16 02:08:10 -04:00
|
|
|
platform: [ubuntu-latest, windows-latest, macos-latest, macos-11, ubuntu-18.04, windows-2022]
|
2021-12-04 06:11:27 -05:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout to branch
|
2022-03-01 19:50:35 +00:00
|
|
|
uses: actions/checkout@v3
|
2021-12-04 06:11:27 -05:00
|
|
|
|
|
|
|
- name: Run changed-files with non existent sha
|
|
|
|
id: changed-files
|
|
|
|
uses: ./
|
|
|
|
continue-on-error: true
|
|
|
|
with:
|
|
|
|
base_sha: "4554456"
|
2021-08-28 04:53:03 +03:00
|
|
|
|
2021-05-25 00:30:19 -04:00
|
|
|
- name: Show output
|
|
|
|
run: |
|
|
|
|
echo "${{ toJSON(steps.changed-files.outputs) }}"
|
2021-06-18 10:19:28 -04:00
|
|
|
shell:
|
|
|
|
bash
|
2021-12-04 06:11:27 -05:00
|
|
|
|
|
|
|
- name: Run changed-files-specific with non existent sha
|
|
|
|
id: changed-files-specific
|
|
|
|
uses: ./
|
|
|
|
continue-on-error: true
|
|
|
|
with:
|
|
|
|
files: action.yml
|
|
|
|
base_sha: "4554456"
|
|
|
|
|
|
|
|
- name: Show output
|
|
|
|
run: |
|
|
|
|
echo "${{ toJSON(steps.changed-files-specific.outputs) }}"
|
|
|
|
shell:
|
|
|
|
bash
|
2021-05-25 00:30:19 -04:00
|
|
|
|
2021-03-04 21:36:52 -05:00
|
|
|
test:
|
|
|
|
name: Test changed-files
|
2021-06-18 10:19:28 -04:00
|
|
|
runs-on: ${{ matrix.platform }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
2022-03-16 01:38:55 -04:00
|
|
|
max-parallel: 4
|
2021-06-18 10:19:28 -04:00
|
|
|
matrix:
|
2022-03-16 02:08:10 -04:00
|
|
|
platform: [ubuntu-latest, windows-latest, macos-latest, macos-11, ubuntu-18.04, windows-2022]
|
2021-06-18 10:19:28 -04:00
|
|
|
|
2021-03-04 21:36:52 -05:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2022-03-01 19:50:35 +00:00
|
|
|
uses: actions/checkout@v3
|
2021-04-23 06:17:20 -04:00
|
|
|
with:
|
2022-02-23 10:39:20 +02:00
|
|
|
submodules: true
|
2021-04-23 06:17:20 -04:00
|
|
|
fetch-depth: 0
|
2021-03-05 07:28:53 -05:00
|
|
|
- name: Run changed-files with defaults
|
2021-03-04 22:36:52 -05:00
|
|
|
id: changed-files
|
2021-03-04 21:36:52 -05:00
|
|
|
uses: ./
|
2021-03-04 22:36:52 -05:00
|
|
|
- name: Show output
|
|
|
|
run: |
|
2021-09-04 09:08:20 -04:00
|
|
|
echo '${{ toJSON(steps.changed-files.outputs) }}'
|
2021-06-18 10:19:28 -04:00
|
|
|
shell:
|
|
|
|
bash
|
2021-03-25 19:23:19 -04:00
|
|
|
- name: List all modified files
|
2021-03-20 08:09:58 -04:00
|
|
|
run: |
|
2021-10-12 09:47:12 -04:00
|
|
|
for file in ${{ steps.changed-files.outputs.modified_files }}; do
|
2021-03-20 08:09:58 -04:00
|
|
|
echo $file
|
|
|
|
done
|
2021-06-18 10:19:28 -04:00
|
|
|
shell:
|
|
|
|
bash
|
2021-04-02 08:27:48 -04:00
|
|
|
- name: Run step when README.md changes
|
2021-04-02 09:00:06 -04:00
|
|
|
if: contains(steps.changed-files.outputs.modified_files, 'README.md')
|
2021-04-02 08:27:48 -04:00
|
|
|
run: |
|
2021-04-02 09:12:33 -04:00
|
|
|
echo "Your README.md has been modified ${{ steps.changed-files.outputs.modified_files }}."
|
2021-06-18 10:19:28 -04:00
|
|
|
shell:
|
|
|
|
bash
|
2022-04-28 02:08:15 -04:00
|
|
|
- name: Run changed-files with quotepath disabled
|
|
|
|
id: changed-files-quotepath
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
quotepath: "false"
|
|
|
|
- name: Show output
|
|
|
|
run: |
|
|
|
|
echo '${{ toJSON(steps.changed-files-quotepath.outputs) }}'
|
|
|
|
shell:
|
|
|
|
bash
|
2021-09-04 09:08:20 -04:00
|
|
|
- name: Run changed-files with forward slash separator
|
|
|
|
id: changed-files-forward-slash
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
separator: "/"
|
|
|
|
- name: Show output
|
|
|
|
run: |
|
|
|
|
echo '${{ toJSON(steps.changed-files-forward-slash.outputs) }}'
|
|
|
|
shell:
|
|
|
|
bash
|
2022-03-08 06:59:26 -05:00
|
|
|
- name: Run changed-files with newline separator
|
|
|
|
id: changed-files-newline
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
separator: "\n"
|
|
|
|
- name: Show output
|
|
|
|
run: |
|
|
|
|
echo '${{ toJSON(steps.changed-files-newline.outputs) }}'
|
|
|
|
shell:
|
|
|
|
bash
|
2021-09-04 09:08:20 -04:00
|
|
|
- name: Run changed-files with pipe separator
|
|
|
|
id: changed-files-pipe
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
separator: "|"
|
|
|
|
- name: Show output
|
|
|
|
run: |
|
|
|
|
echo '${{ toJSON(steps.changed-files-pipe.outputs) }}'
|
|
|
|
shell:
|
|
|
|
bash
|
2021-03-05 07:28:53 -05:00
|
|
|
- name: Run changed-files with comma separator
|
|
|
|
id: changed-files-comma
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
separator: ","
|
|
|
|
- name: Show output
|
|
|
|
run: |
|
2021-09-04 09:08:20 -04:00
|
|
|
echo '${{ toJSON(steps.changed-files-comma.outputs) }}'
|
2021-06-18 10:19:28 -04:00
|
|
|
shell:
|
|
|
|
bash
|
2022-03-08 06:59:26 -05:00
|
|
|
- name: Run changed-files with specific files from a source file using a newline separator
|
|
|
|
id: changed-files-specific-newline-source-file
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
files_from_source_file: |
|
|
|
|
test/changed-files-list.txt
|
|
|
|
separator: "\n"
|
|
|
|
- name: Show output
|
|
|
|
run: |
|
|
|
|
echo '${{ toJSON(steps.changed-files-specific-newline-source-file.outputs) }}'
|
|
|
|
shell:
|
|
|
|
bash
|
2021-05-01 07:55:01 -04:00
|
|
|
- name: Run changed-files with specific files
|
|
|
|
id: changed-files-specific
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
files: |
|
|
|
|
.github/workflows/test.yml
|
2021-05-01 19:58:35 -04:00
|
|
|
action.yml
|
2022-01-26 12:41:38 +09:00
|
|
|
**/test.txt
|
2022-02-14 22:33:45 -05:00
|
|
|
files_ignore: |
|
|
|
|
test/test/test.txt
|
2021-09-04 09:08:20 -04:00
|
|
|
- name: Show output
|
|
|
|
run: |
|
|
|
|
echo '${{ toJSON(steps.changed-files-specific.outputs) }}'
|
|
|
|
shell:
|
|
|
|
bash
|
2022-01-25 10:50:47 +09:00
|
|
|
- name: Check if a excluded file is not included in any_changed
|
2022-01-26 12:41:38 +09:00
|
|
|
if: "contains(steps.changed-files-specific.outputs.all_changed_files, 'test/test/test.txt')"
|
2022-01-25 10:50:47 +09:00
|
|
|
run: |
|
2022-01-26 12:41:38 +09:00
|
|
|
echo "Invalid output: Expected not to include (test/test/test.txt) got (${{ steps.changed-files-specific.outputs.all_changed_files }})"
|
2022-01-25 10:50:47 +09:00
|
|
|
exit 1
|
|
|
|
shell:
|
|
|
|
bash
|
2021-09-05 08:22:47 -04:00
|
|
|
- name: Verify any_changed for specific files
|
2022-01-26 12:41:38 +09:00
|
|
|
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')"
|
2021-05-16 16:26:22 -04:00
|
|
|
run: |
|
2021-05-17 04:19:10 -04:00
|
|
|
if [[ "${{ steps.changed-files-specific.outputs.any_changed }}" != "false" ]]; then
|
|
|
|
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific.outputs.any_changed }})"
|
2021-05-16 16:26:22 -04:00
|
|
|
exit 1
|
|
|
|
fi
|
2021-06-18 10:19:28 -04:00
|
|
|
shell:
|
|
|
|
bash
|
2022-01-25 10:50:47 +09:00
|
|
|
- name: Check if a excluded file is not included in any_modified
|
2022-01-26 12:41:38 +09:00
|
|
|
if: "contains(steps.changed-files-specific.outputs.all_modified_files, 'test/test/test.txt')"
|
2022-01-25 10:50:47 +09:00
|
|
|
run: |
|
2022-01-26 12:41:38 +09:00
|
|
|
echo "Invalid output: Expected not to include (test/test/test.txt) got (${{ steps.changed-files-specific.outputs.all_modified_files }})"
|
2022-01-25 10:50:47 +09:00
|
|
|
exit 1
|
|
|
|
shell:
|
|
|
|
bash
|
2021-12-14 02:01:31 -05:00
|
|
|
- name: Verify any_modified for specific files
|
2022-01-26 12:41:38 +09:00
|
|
|
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')"
|
2021-12-14 02:01:31 -05:00
|
|
|
run: |
|
|
|
|
if [[ "${{ steps.changed-files-specific.outputs.any_modified }}" != "false" ]]; then
|
|
|
|
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific.outputs.any_modified }})"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
shell:
|
|
|
|
bash
|
2022-01-25 10:50:47 +09:00
|
|
|
- name: Check if a excluded file is not included in any_deleted
|
2022-01-26 12:41:38 +09:00
|
|
|
if: "contains(steps.changed-files-specific.outputs.deleted_files, 'test/test/test.txt')"
|
2022-01-25 10:50:47 +09:00
|
|
|
run: |
|
2022-01-26 12:41:38 +09:00
|
|
|
echo "Invalid output: Expected not to include (test/test/test.txt) got (${{ steps.changed-files-specific.outputs.deleted_files }})"
|
2022-01-25 10:50:47 +09:00
|
|
|
exit 1
|
|
|
|
shell:
|
|
|
|
bash
|
2021-09-05 08:22:47 -04:00
|
|
|
- name: Verify any_deleted for specific files
|
2022-01-26 12:41:38 +09:00
|
|
|
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')"
|
2021-09-05 08:22:47 -04:00
|
|
|
run: |
|
|
|
|
if [[ "${{ steps.changed-files-specific.outputs.any_deleted }}" != "false" ]]; then
|
|
|
|
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific.outputs.any_deleted }})"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
shell:
|
|
|
|
bash
|
2021-08-06 06:14:50 -04:00
|
|
|
- name: Run changed-files with specific files comma check duplicates
|
|
|
|
id: changed-files-specific-duplicate-output
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
files: |
|
|
|
|
entrypoint.sh
|
|
|
|
*.sh
|
2021-12-14 02:01:31 -05:00
|
|
|
- name: Verify all_changed_files files has no duplicates
|
2021-12-14 00:21:49 -05:00
|
|
|
if: contains(steps.changed-files-specific-duplicate-output.outputs.all_changed_files, 'entrypoint.sh')
|
2021-08-06 06:14:50 -04:00
|
|
|
run: |
|
2021-12-14 02:01:31 -05:00
|
|
|
ALL_CHANGED_FILES=(${{ steps.changed-files-specific-duplicate-output.outputs.all_changed_files }})
|
|
|
|
UNIQUE_ALL_CHANGED_FILES=$(echo "$ALL_CHANGED_FILES" | tr ' ' '\n' | sort -u | xargs)
|
|
|
|
|
|
|
|
if [[ "$ALL_CHANGED_FILES[@]" != "$UNIQUE_ALL_CHANGED_FILES[@]" ]]; then
|
|
|
|
echo "Duplicate output: Expected "$UNIQUE_ALL_CHANGED_FILES" got $ALL_CHANGED_FILES"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
shell:
|
|
|
|
bash
|
|
|
|
- name: Verify all_changed_and_modified_files files has no duplicates
|
|
|
|
if: contains(steps.changed-files-specific-duplicate-output.outputs.all_changed_and_modified_files, 'entrypoint.sh')
|
|
|
|
run: |
|
|
|
|
ALL_CHANGED_AND_MODIFIED_FILES=(${{ steps.changed-files-specific-duplicate-output.outputs.all_changed_and_modified_files }})
|
2021-09-04 09:42:11 -04:00
|
|
|
UNIQUE_ALL_CHANGED_AND_MODIFIED_FILES=$(echo "$ALL_CHANGED_AND_MODIFIED_FILES" | tr ' ' '\n' | sort -u | xargs)
|
2021-08-06 06:14:50 -04:00
|
|
|
|
2021-09-04 09:42:11 -04:00
|
|
|
if [[ "$ALL_CHANGED_AND_MODIFIED_FILES[@]" != "$UNIQUE_ALL_CHANGED_AND_MODIFIED_FILES[@]" ]]; then
|
|
|
|
echo "Duplicate output: Expected "$UNIQUE_ALL_CHANGED_AND_MODIFIED_FILES" got $ALL_CHANGED_AND_MODIFIED_FILES"
|
2021-08-06 06:14:50 -04:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
shell:
|
|
|
|
bash
|
2021-12-14 02:01:31 -05:00
|
|
|
- name: Verify all_modified_files files has no duplicates
|
|
|
|
if: contains(steps.changed-files-specific-duplicate-output.outputs.all_modified_files, 'entrypoint.sh')
|
|
|
|
run: |
|
|
|
|
ALL_MODIFIED_FILES=(${{ steps.changed-files-specific-duplicate-output.outputs.all_modified_files }})
|
|
|
|
UNIQUE_ALL_MODIFIED_FILES=$(echo "$ALL_MODIFIED_FILES" | tr ' ' '\n' | sort -u | xargs)
|
|
|
|
|
|
|
|
if [[ "$ALL_MODIFIED_FILES[@]" != "$UNIQUE_ALL_MODIFIED_FILES[@]" ]]; then
|
|
|
|
echo "Duplicate output: Expected "$UNIQUE_ALL_MODIFIED_FILES" got $ALL_MODIFIED_FILES"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
shell:
|
|
|
|
bash
|
2021-05-01 08:59:18 -04:00
|
|
|
- name: Run changed-files with specific files comma separator
|
|
|
|
id: changed-files-specific-comma
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
files: |
|
|
|
|
.github/workflows/test.yml
|
2021-05-01 19:58:35 -04:00
|
|
|
action.yml
|
2021-05-01 08:59:18 -04:00
|
|
|
separator: ","
|
2021-09-04 09:08:20 -04:00
|
|
|
- name: Show output
|
|
|
|
run: |
|
|
|
|
echo '${{ toJSON(steps.changed-files-specific-comma.outputs) }}'
|
|
|
|
shell:
|
|
|
|
bash
|
2021-07-17 10:51:08 -04:00
|
|
|
- name: Verify any_changed files comma separator
|
2021-12-14 00:21:49 -05:00
|
|
|
if: "!contains(steps.changed-files-specific-comma.outputs.all_changed_files, 'action.yml') && !contains(steps.changed-files-specific-comma.outputs.all_changed_files, '.github/workflows/test.yml')"
|
2021-09-04 09:08:20 -04:00
|
|
|
run: |
|
|
|
|
if [[ "${{ steps.changed-files-specific-comma.outputs.any_changed }}" != "false" ]]; then
|
|
|
|
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-comma.outputs.any_changed }})"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
shell:
|
|
|
|
bash
|
2021-12-14 02:01:31 -05:00
|
|
|
- name: Verify any_modified files comma separator
|
|
|
|
if: "!contains(steps.changed-files-specific-comma.outputs.all_modified_files, 'action.yml') && !contains(steps.changed-files-specific-comma.outputs.all_modified_files, '.github/workflows/test.yml')"
|
|
|
|
run: |
|
|
|
|
if [[ "${{ steps.changed-files-specific-comma.outputs.any_modified }}" != "false" ]]; then
|
|
|
|
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-comma.outputs.any_modified }})"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
shell:
|
|
|
|
bash
|
2021-09-05 08:22:47 -04:00
|
|
|
- name: Verify any_deleted files comma separator
|
|
|
|
if: "!contains(steps.changed-files-specific-comma.outputs.deleted_files, 'action.yml') && !contains(steps.changed-files-specific-comma.outputs.deleted_files, '.github/workflows/test.yml')"
|
|
|
|
run: |
|
|
|
|
if [[ "${{ steps.changed-files-specific-comma.outputs.any_deleted }}" != "false" ]]; then
|
|
|
|
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-comma.outputs.any_deleted }})"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
shell:
|
|
|
|
bash
|
2021-09-04 09:08:20 -04:00
|
|
|
- name: Run changed-files with specific files pipe separator
|
|
|
|
id: changed-files-specific-pipe
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
files: |
|
2022-01-04 21:38:03 -05:00
|
|
|
**/test.yml
|
2021-09-04 09:08:20 -04:00
|
|
|
action.yml
|
|
|
|
separator: "|"
|
|
|
|
- name: Show output
|
|
|
|
run: |
|
|
|
|
echo '${{ toJSON(steps.changed-files-specific-pipe.outputs) }}'
|
|
|
|
shell:
|
|
|
|
bash
|
|
|
|
- name: Verify any_changed files comma separator
|
2021-12-14 00:21:49 -05:00
|
|
|
if: "!contains(steps.changed-files-specific-pipe.outputs.all_changed_files, 'action.yml') && !contains(steps.changed-files-specific-pipe.outputs.all_changed_files, '.github/workflows/test.yml')"
|
2021-09-04 09:08:20 -04:00
|
|
|
run: |
|
|
|
|
if [[ "${{ steps.changed-files-specific-pipe.outputs.any_changed }}" != "false" ]]; then
|
|
|
|
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-pipe.outputs.any_changed }})"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
shell:
|
|
|
|
bash
|
2021-12-14 02:01:31 -05:00
|
|
|
- name: Verify any_modified files comma separator
|
|
|
|
if: "!contains(steps.changed-files-specific-pipe.outputs.all_modified_files, 'action.yml') && !contains(steps.changed-files-specific-pipe.outputs.all_modified_files, '.github/workflows/test.yml')"
|
|
|
|
run: |
|
|
|
|
if [[ "${{ steps.changed-files-specific-pipe.outputs.any_modified }}" != "false" ]]; then
|
|
|
|
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-pipe.outputs.any_modified }})"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
shell:
|
|
|
|
bash
|
2021-09-05 08:22:47 -04:00
|
|
|
- name: Verify any_deleted files comma separator
|
|
|
|
if: "!contains(steps.changed-files-specific-pipe.outputs.deleted_files, 'action.yml') && !contains(steps.changed-files-specific-pipe.outputs.deleted_files, '.github/workflows/test.yml')"
|
|
|
|
run: |
|
|
|
|
if [[ "${{ steps.changed-files-specific-pipe.outputs.any_deleted }}" != "false" ]]; then
|
|
|
|
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-pipe.outputs.any_deleted }})"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
shell:
|
|
|
|
bash
|
2021-09-04 09:08:20 -04:00
|
|
|
- name: Run changed-files with specific files forward slash separator
|
|
|
|
id: changed-files-specific-forward-slash
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
files: |
|
|
|
|
.github/workflows/test.yml
|
|
|
|
action.yml
|
|
|
|
separator: "/"
|
|
|
|
- name: Show output
|
|
|
|
run: |
|
|
|
|
echo '${{ toJSON(steps.changed-files-specific-forward-slash.outputs) }}'
|
|
|
|
shell:
|
|
|
|
bash
|
2022-02-17 02:35:49 -05:00
|
|
|
- name: Verify any_changed files forward slash separator
|
2021-12-14 00:21:49 -05:00
|
|
|
if: "!contains(steps.changed-files-specific-forward-slash.outputs.all_changed_files, 'action.yml') && !contains(steps.changed-files-specific-forward-slash.outputs.all_changed_files, '.github/workflows/test.yml')"
|
2021-07-17 10:51:08 -04:00
|
|
|
run: |
|
2022-02-17 02:35:49 -05:00
|
|
|
if [[ "${{ steps.changed-files-specific-forward-slash.outputs.any_changed }}" != "false" ]]; then
|
2021-09-04 09:08:20 -04:00
|
|
|
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-forward-slash.outputs.any_changed }})"
|
2021-07-17 10:51:08 -04:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
shell:
|
|
|
|
bash
|
2022-02-17 02:35:49 -05:00
|
|
|
- name: Verify any_modified files forward slash separator
|
2021-12-14 02:01:31 -05:00
|
|
|
if: "!contains(steps.changed-files-specific-forward-slash.outputs.all_modified_files, 'action.yml') && !contains(steps.changed-files-specific-forward-slash.outputs.all_modified_files, '.github/workflows/test.yml')"
|
|
|
|
run: |
|
2022-02-17 02:35:49 -05:00
|
|
|
if [[ "${{ steps.changed-files-specific-forward-slash.outputs.any_modified }}" != "false" ]]; then
|
2021-12-14 02:01:31 -05:00
|
|
|
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-forward-slash.outputs.any_modified }})"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
shell:
|
|
|
|
bash
|
2022-02-17 02:35:49 -05:00
|
|
|
- name: Verify any_deleted files forward slash separator
|
2021-09-05 08:22:47 -04:00
|
|
|
if: "!contains(steps.changed-files-specific-forward-slash.outputs.deleted_files, 'action.yml') && !contains(steps.changed-files-specific-forward-slash.outputs.deleted_files, '.github/workflows/test.yml')"
|
|
|
|
run: |
|
2022-02-17 02:35:49 -05:00
|
|
|
if [[ "${{ steps.changed-files-specific-forward-slash.outputs.any_deleted }}" != "false" ]]; then
|
2021-09-05 08:22:47 -04:00
|
|
|
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-forward-slash.outputs.any_deleted }})"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
shell:
|
|
|
|
bash
|
2021-07-17 10:51:08 -04:00
|
|
|
- name: Run changed-files with specific files from a source file
|
|
|
|
id: changed-files-specific-source-file
|
|
|
|
uses: ./
|
|
|
|
with:
|
2021-07-17 11:46:59 -04:00
|
|
|
files_from_source_file: |
|
2021-07-17 10:51:08 -04:00
|
|
|
test/changed-files-list.txt
|
|
|
|
test/changed-files-list.txt
|
|
|
|
files: |
|
2022-03-29 14:18:12 -04:00
|
|
|
**/workflows/greetings.yml
|
2022-01-25 10:50:47 +09:00
|
|
|
- name: Check if a excluded file is not included in any_changed
|
2022-01-26 12:41:38 +09:00
|
|
|
if: contains(steps.changed-files-specific-source-file.outputs.all_changed_files, 'test/test/test.txt')
|
2022-01-25 10:50:47 +09:00
|
|
|
run: |
|
2022-01-26 12:41:38 +09:00
|
|
|
echo "Invalid output: Expected not to include (test/test/test.txt) got (${{ steps.changed-files-specific-source-file.outputs.all_changed_files }})"
|
2022-01-25 10:50:47 +09:00
|
|
|
exit 1
|
|
|
|
shell:
|
|
|
|
bash
|
2021-09-05 08:22:47 -04:00
|
|
|
- name: Verify any_changed from source files
|
2021-10-15 13:36:09 -04:00
|
|
|
if: |
|
|
|
|
(
|
2021-12-14 00:21:49 -05:00
|
|
|
!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') &&
|
2022-03-29 14:18:12 -04:00
|
|
|
!contains(steps.changed-files-specific-source-file.outputs.all_changed_files, '.github/workflows/greetings.yml') &&
|
2022-01-26 12:41:38 +09:00
|
|
|
!contains(steps.changed-files-specific-source-file.outputs.all_changed_files, 'test/test.txt')
|
2021-10-15 13:36:09 -04:00
|
|
|
)
|
2021-07-17 10:51:08 -04:00
|
|
|
run: |
|
2021-09-04 09:08:20 -04:00
|
|
|
if [[ "${{ steps.changed-files-specific-source-file.outputs.any_changed }}" != "false" ]]; then
|
|
|
|
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-source-file.outputs.any_changed }})"
|
2021-07-17 10:51:08 -04:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
shell:
|
|
|
|
bash
|
2022-01-25 10:50:47 +09:00
|
|
|
- name: Check if a excluded file is not included in any_modified
|
2022-01-26 12:41:38 +09:00
|
|
|
if: contains(steps.changed-files-specific-source-file.outputs.all_modified_files, 'test/test/test.txt')
|
2022-01-25 10:50:47 +09:00
|
|
|
run: |
|
2022-01-26 12:41:38 +09:00
|
|
|
echo "Invalid output: Expected not to include (test/test/test.txt) got (${{ steps.changed-files-specific-source-file.outputs.all_modified_files }})"
|
2022-01-25 10:50:47 +09:00
|
|
|
exit 1
|
|
|
|
shell:
|
|
|
|
bash
|
2021-12-14 02:01:31 -05:00
|
|
|
- name: Verify any_modified from source files
|
|
|
|
if: |
|
|
|
|
(
|
|
|
|
!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') &&
|
2022-03-29 14:18:12 -04:00
|
|
|
!contains(steps.changed-files-specific-source-file.outputs.all_modified_files, '.github/workflows/greetings.yml') &&
|
2022-01-26 12:41:38 +09:00
|
|
|
!contains(steps.changed-files-specific-source-file.outputs.all_modified_files, 'test/test.txt')
|
2021-12-14 02:01:31 -05:00
|
|
|
)
|
|
|
|
run: |
|
|
|
|
if [[ "${{ steps.changed-files-specific-source-file.outputs.any_modified }}" != "false" ]]; then
|
|
|
|
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-source-file.outputs.any_modified }})"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
shell:
|
|
|
|
bash
|
2022-01-25 10:50:47 +09:00
|
|
|
- name: Check if a excluded file is not included in any_deleted
|
2022-01-26 12:41:38 +09:00
|
|
|
if: contains(steps.changed-files-specific-source-file.outputs.deleted_files, 'test/test/test.txt')
|
2022-01-25 10:50:47 +09:00
|
|
|
run: |
|
2022-01-26 12:41:38 +09:00
|
|
|
echo "Invalid output: Expected not to include (test/test/test.txt) got (${{ steps.changed-files-specific-source-file.outputs.deleted_files }})"
|
2022-01-25 10:50:47 +09:00
|
|
|
exit 1
|
|
|
|
shell:
|
|
|
|
bash
|
2021-09-05 08:22:47 -04:00
|
|
|
- name: Verify any_deleted from source files
|
2022-01-26 12:41:38 +09:00
|
|
|
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')"
|
2021-09-05 08:22:47 -04:00
|
|
|
run: |
|
|
|
|
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 }})"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
shell:
|
|
|
|
bash
|
2021-07-17 10:51:08 -04:00
|
|
|
- name: Show output
|
|
|
|
run: |
|
2021-09-04 09:08:20 -04:00
|
|
|
echo '${{ toJSON(steps.changed-files-specific-source-file.outputs) }}'
|
2021-07-17 10:51:08 -04:00
|
|
|
shell:
|
|
|
|
bash
|
|
|
|
- name: Run changed-files with specific files from a source file using a comma separator
|
|
|
|
id: changed-files-specific-comma-source-file
|
|
|
|
uses: ./
|
|
|
|
with:
|
2021-07-17 11:46:59 -04:00
|
|
|
files_from_source_file: |
|
2021-07-17 10:51:08 -04:00
|
|
|
test/changed-files-list.txt
|
|
|
|
separator: ","
|
2021-09-05 08:22:47 -04:00
|
|
|
- name: Show output
|
|
|
|
run: |
|
|
|
|
echo '${{ toJSON(steps.changed-files-specific-comma-source-file.outputs) }}'
|
|
|
|
shell:
|
|
|
|
bash
|
2021-05-17 04:02:50 -04:00
|
|
|
- name: Verify any_changed files comma separator
|
2022-03-14 01:01:27 -04:00
|
|
|
if: "!contains(steps.changed-files-specific-comma-source-file.outputs.all_changed_files, 'action.yml') && !contains(steps.changed-files-specific-comma-source-file.outputs.all_changed_files, '.github/workflows/test.yml') && !contains(steps.changed-files-specific-comma.outputs.all_changed_files, 'test/test.txt')"
|
2021-05-17 04:02:50 -04:00
|
|
|
run: |
|
2021-09-04 09:08:20 -04:00
|
|
|
if [[ "${{ steps.changed-files-specific-comma-source-file.outputs.any_changed }}" != "false" ]]; then
|
|
|
|
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-comma-source-file.outputs.any_changed }})"
|
2021-05-17 04:02:50 -04:00
|
|
|
exit 1
|
|
|
|
fi
|
2021-06-18 10:19:28 -04:00
|
|
|
shell:
|
|
|
|
bash
|
2021-12-14 02:01:31 -05:00
|
|
|
- name: Verify any_modified files comma separator
|
2022-03-14 01:01:27 -04:00
|
|
|
if: "!contains(steps.changed-files-specific-comma-source-file.outputs.all_modified_files, 'action.yml') && !contains(steps.changed-files-specific-comma-source-file.outputs.all_modified_files, '.github/workflows/test.yml') && !contains(steps.changed-files-specific-comma.outputs.all_modified_files, 'test/test.txt')"
|
2021-12-14 02:01:31 -05:00
|
|
|
run: |
|
|
|
|
if [[ "${{ steps.changed-files-specific-comma-source-file.outputs.any_modified }}" != "false" ]]; then
|
|
|
|
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-comma-source-file.outputs.any_modified }})"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
shell:
|
|
|
|
bash
|
2021-09-05 08:22:47 -04:00
|
|
|
- name: Verify any_deleted files with comma separator
|
2022-03-14 01:01:27 -04:00
|
|
|
if: "!contains(steps.changed-files-specific-comma-source-file.outputs.deleted_files, 'action.yml') && !contains(steps.changed-files-specific-comma-source-file.outputs.deleted_files, '.github/workflows/test.yml') && !contains(steps.changed-files-specific-comma.outputs.deleted_files, 'test/test.txt')"
|
2021-05-01 08:59:18 -04:00
|
|
|
run: |
|
2021-09-05 08:22:47 -04:00
|
|
|
if [[ "${{ steps.changed-files-specific-comma-source-file.outputs.any_deleted }}" != "false" ]]; then
|
|
|
|
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-comma-source-file.outputs.any_deleted }})"
|
|
|
|
exit 1
|
|
|
|
fi
|
2021-06-18 10:19:28 -04:00
|
|
|
shell:
|
|
|
|
bash
|
2021-07-14 23:57:17 +03:00
|
|
|
- name: Run changed-files with custom sha
|
|
|
|
id: changed-files-custom-sha
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
sha: ${{ github.event.pull_request.head.sha }}
|
|
|
|
- name: Show output
|
|
|
|
run: |
|
2021-09-04 09:08:20 -04:00
|
|
|
echo '${{ toJSON(steps.changed-files-custom-sha.outputs) }}'
|
2021-07-14 23:57:17 +03:00
|
|
|
shell:
|
|
|
|
bash
|
2021-10-30 15:55:58 -04:00
|
|
|
- name: Run changed-files with since_last_remote_commit set to true
|
|
|
|
id: changed-files-since-last-remote-commit
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
since_last_remote_commit: 'true'
|
|
|
|
- name: Show output
|
|
|
|
run: |
|
|
|
|
echo '${{ toJSON(steps.changed-files-since-last-remote-commit.outputs) }}'
|
|
|
|
shell:
|
|
|
|
bash
|
2021-12-04 07:00:44 -05:00
|
|
|
- name: Get branch name
|
|
|
|
id: branch-name
|
|
|
|
uses: tj-actions/branch-names@v5
|
|
|
|
if: github.event_name == 'pull_request'
|
|
|
|
- uses: nrwl/last-successful-commit-action@v1
|
|
|
|
id: last_successful_commit
|
|
|
|
if: github.event_name == 'pull_request'
|
|
|
|
with:
|
|
|
|
branch: ${{ steps.branch-name.outputs.base_ref_branch }}
|
|
|
|
workflow_id: 'test.yml'
|
|
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
2021-07-17 11:46:59 -04:00
|
|
|
- name: Run changed-files with a custom base sha
|
2021-12-04 07:00:44 -05:00
|
|
|
if: github.event_name == 'pull_request'
|
2021-07-17 11:46:59 -04:00
|
|
|
id: changed-files-custom-base-sha
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
base_sha: ${{ steps.last_successful_commit.outputs.commit_hash }}
|
|
|
|
- name: Show output
|
2021-12-04 07:00:44 -05:00
|
|
|
if: github.event_name == 'pull_request'
|
2021-07-17 11:46:59 -04:00
|
|
|
run: |
|
2021-09-04 09:08:20 -04:00
|
|
|
echo '${{ toJSON(steps.changed-files-custom-base-sha.outputs) }}'
|
2021-07-17 11:46:59 -04:00
|
|
|
shell:
|
|
|
|
bash
|
2021-07-17 15:13:26 -04:00
|
|
|
- name: Run changed-files with specific files (only-changed)
|
|
|
|
id: changed-files-specific-only-changed
|
|
|
|
uses: ./
|
|
|
|
with:
|
|
|
|
files: |
|
2022-01-04 21:38:03 -05:00
|
|
|
.github/**/test.yml
|
2021-07-17 15:13:26 -04:00
|
|
|
- name: Verify only_changed files
|
|
|
|
if: steps.changed-files-specific-only-changed.outputs.other_changed_files != ''
|
|
|
|
run: |
|
|
|
|
if [[ "${{ steps.changed-files-specific-only-changed.outputs.only_changed }}" != "false" ]]; then
|
|
|
|
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-only-changed.outputs.only_changed }})"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
shell:
|
|
|
|
bash
|
2021-09-05 08:22:47 -04:00
|
|
|
- name: Verify only_deleted files
|
|
|
|
if: steps.changed-files-specific-only-changed.outputs.other_deleted_files != ''
|
|
|
|
run: |
|
|
|
|
if [[ "${{ steps.changed-files-specific-only-changed.outputs.only_deleted }}" != "false" ]]; then
|
2022-02-01 22:30:40 -05:00
|
|
|
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-only-changed.outputs.only_deleted }})."
|
2021-09-05 08:22:47 -04:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
shell:
|
|
|
|
bash
|
2021-07-17 15:13:26 -04:00
|
|
|
- name: Show output
|
|
|
|
run: |
|
2021-09-04 09:08:20 -04:00
|
|
|
echo '${{ toJSON(steps.changed-files-specific-only-changed.outputs) }}'
|
2021-07-17 15:13:26 -04:00
|
|
|
shell:
|
|
|
|
bash
|