Update handling separator. (#181)
This commit is contained in:
115
.github/workflows/test.yml
vendored
115
.github/workflows/test.yml
vendored
@@ -40,13 +40,13 @@ jobs:
|
||||
path: dir1
|
||||
- name: Show output
|
||||
run: |
|
||||
echo "${{ toJSON(steps.changed-files-dir1.outputs) }}"
|
||||
echo '${{ toJSON(steps.changed-files-dir1.outputs) }}'
|
||||
shell:
|
||||
bash
|
||||
- name: List all modified files
|
||||
run: |
|
||||
for file in "${{ steps.changed-files-dir1.outputs.modified_files }}"; do
|
||||
echo $file
|
||||
echo "$file"
|
||||
done
|
||||
shell:
|
||||
bash
|
||||
@@ -62,13 +62,13 @@ jobs:
|
||||
path: dir2
|
||||
- name: Show output
|
||||
run: |
|
||||
echo "${{ toJSON(steps.changed-files-dir2.outputs) }}"
|
||||
echo '${{ toJSON(steps.changed-files-dir2.outputs) }}'
|
||||
shell:
|
||||
bash
|
||||
- name: List all modified files
|
||||
run: |
|
||||
for file in "${{ steps.changed-files-dir2.outputs.modified_files }}"; do
|
||||
echo $file
|
||||
echo "$file"
|
||||
done
|
||||
shell:
|
||||
bash
|
||||
@@ -114,7 +114,7 @@ jobs:
|
||||
uses: ./
|
||||
- name: Show output
|
||||
run: |
|
||||
echo "${{ toJSON(steps.changed-files.outputs) }}"
|
||||
echo '${{ toJSON(steps.changed-files.outputs) }}'
|
||||
shell:
|
||||
bash
|
||||
- name: List all modified files
|
||||
@@ -130,6 +130,26 @@ jobs:
|
||||
echo "Your README.md has been modified ${{ steps.changed-files.outputs.modified_files }}."
|
||||
shell:
|
||||
bash
|
||||
- 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
|
||||
- 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
|
||||
- name: Run changed-files with comma separator
|
||||
id: changed-files-comma
|
||||
uses: ./
|
||||
@@ -137,7 +157,7 @@ jobs:
|
||||
separator: ","
|
||||
- name: Show output
|
||||
run: |
|
||||
echo "${{ toJSON(steps.changed-files-comma.outputs) }}"
|
||||
echo '${{ toJSON(steps.changed-files-comma.outputs) }}'
|
||||
shell:
|
||||
bash
|
||||
- name: Run changed-files with specific files
|
||||
@@ -147,6 +167,11 @@ jobs:
|
||||
files: |
|
||||
.github/workflows/test.yml
|
||||
action.yml
|
||||
- name: Show output
|
||||
run: |
|
||||
echo '${{ toJSON(steps.changed-files-specific.outputs) }}'
|
||||
shell:
|
||||
bash
|
||||
- name: Verify any_changed 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: |
|
||||
@@ -156,11 +181,6 @@ jobs:
|
||||
fi
|
||||
shell:
|
||||
bash
|
||||
- name: Show output
|
||||
run: |
|
||||
echo "${{ toJSON(steps.changed-files-specific.outputs) }}"
|
||||
shell:
|
||||
bash
|
||||
- name: Run changed-files with specific files comma check duplicates
|
||||
id: changed-files-specific-duplicate-output
|
||||
uses: ./
|
||||
@@ -188,11 +208,60 @@ jobs:
|
||||
.github/workflows/test.yml
|
||||
action.yml
|
||||
separator: ","
|
||||
- name: Show output
|
||||
run: |
|
||||
echo '${{ toJSON(steps.changed-files-specific-comma.outputs) }}'
|
||||
shell:
|
||||
bash
|
||||
- name: Verify any_changed 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_changed }}" != "false" ]]; then
|
||||
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-comma.outputs.any_changed }})"
|
||||
exit 1
|
||||
fi
|
||||
shell:
|
||||
bash
|
||||
- name: Run changed-files with specific files pipe separator
|
||||
id: changed-files-specific-pipe
|
||||
uses: ./
|
||||
with:
|
||||
files: |
|
||||
.github/workflows/test.yml
|
||||
action.yml
|
||||
separator: "|"
|
||||
- name: Show output
|
||||
run: |
|
||||
echo '${{ toJSON(steps.changed-files-specific-pipe.outputs) }}'
|
||||
shell:
|
||||
bash
|
||||
- name: Verify any_changed 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_changed }}" != "false" ]]; then
|
||||
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-pipe.outputs.any_changed }})"
|
||||
exit 1
|
||||
fi
|
||||
shell:
|
||||
bash
|
||||
- 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
|
||||
- name: Verify any_changed files comma separator
|
||||
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: |
|
||||
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-forward-slash.outputs.any_changed }})"
|
||||
exit 1
|
||||
fi
|
||||
shell:
|
||||
@@ -207,17 +276,17 @@ jobs:
|
||||
files: |
|
||||
.github/workflows/rebase.yml
|
||||
- name: Verify any_changed 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-source-file.outputs.all_modified_files, 'action.yml') && !contains(steps.changed-files-specific-source-file.outputs.all_modified_files, '.github/workflows/test.yml')"
|
||||
run: |
|
||||
if [[ "${{ steps.changed-files-specific.outputs.any_changed }}" != "false" ]]; then
|
||||
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific.outputs.any_changed }})"
|
||||
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 }})"
|
||||
exit 1
|
||||
fi
|
||||
shell:
|
||||
bash
|
||||
- name: Show output
|
||||
run: |
|
||||
echo "${{ toJSON(steps.changed-files-specific.outputs) }}"
|
||||
echo '${{ toJSON(steps.changed-files-specific-source-file.outputs) }}'
|
||||
shell:
|
||||
bash
|
||||
- name: Run changed-files with specific files from a source file using a comma separator
|
||||
@@ -228,17 +297,17 @@ jobs:
|
||||
test/changed-files-list.txt
|
||||
separator: ","
|
||||
- name: Verify any_changed 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')"
|
||||
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')"
|
||||
run: |
|
||||
if [[ "${{ steps.changed-files-specific.outputs.any_changed }}" != "false" ]]; then
|
||||
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific.outputs.any_changed }})"
|
||||
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 }})"
|
||||
exit 1
|
||||
fi
|
||||
shell:
|
||||
bash
|
||||
- name: Show output
|
||||
run: |
|
||||
echo "${{ toJSON(steps.changed-files-specific-comma.outputs) }}"
|
||||
echo '${{ toJSON(steps.changed-files-specific-comma-source-file.outputs) }}'
|
||||
shell:
|
||||
bash
|
||||
- name: Run changed-files with custom sha
|
||||
@@ -248,7 +317,7 @@ jobs:
|
||||
sha: ${{ github.event.pull_request.head.sha }}
|
||||
- name: Show output
|
||||
run: |
|
||||
echo "${{ toJSON(steps.changed-files-custom-sha.outputs) }}"
|
||||
echo '${{ toJSON(steps.changed-files-custom-sha.outputs) }}'
|
||||
shell:
|
||||
bash
|
||||
- name: Get branch name
|
||||
@@ -267,7 +336,7 @@ jobs:
|
||||
base_sha: ${{ steps.last_successful_commit.outputs.commit_hash }}
|
||||
- name: Show output
|
||||
run: |
|
||||
echo "${{ toJSON(steps.changed-files-custom-base-sha.outputs) }}"
|
||||
echo '${{ toJSON(steps.changed-files-custom-base-sha.outputs) }}'
|
||||
shell:
|
||||
bash
|
||||
- name: Run changed-files with specific files (only-changed)
|
||||
@@ -287,6 +356,6 @@ jobs:
|
||||
bash
|
||||
- name: Show output
|
||||
run: |
|
||||
echo "${{ toJSON(steps.changed-files-specific-only-changed.outputs) }}"
|
||||
echo '${{ toJSON(steps.changed-files-specific-only-changed.outputs) }}'
|
||||
shell:
|
||||
bash
|
||||
|
||||
Reference in New Issue
Block a user