fix: bug with files ignore yaml patterns not filtering the list of files (#2304)
Co-authored-by: GitHub Action <action@github.com>
This commit is contained in:
parent
641e22af4a
commit
d0cf1645b7
18
.github/workflows/test.yml
vendored
18
.github/workflows/test.yml
vendored
@ -758,6 +758,24 @@ jobs:
|
||||
shell:
|
||||
bash
|
||||
|
||||
- name: Run changed-files with files_yaml, files_ignore_yaml
|
||||
id: changed-files-ignore
|
||||
uses: ./
|
||||
with:
|
||||
files_yaml: |
|
||||
test:
|
||||
- test/**.txt
|
||||
- test/**.md
|
||||
files_ignore_yaml: |
|
||||
test:
|
||||
- test/test.txt
|
||||
|
||||
- name: Show output
|
||||
run: |
|
||||
echo "${{ toJSON(steps.changed-files-ignore.outputs) }}"
|
||||
shell:
|
||||
bash
|
||||
|
||||
- name: Run changed-files with files_yaml, json and write_output_files
|
||||
id: changed-files-json-write-output-files
|
||||
uses: ./
|
||||
|
4
dist/index.js
generated
vendored
4
dist/index.js
generated
vendored
@ -2743,6 +2743,10 @@ const getYamlFilePatterns = async ({ inputs, workingDirectory }) => {
|
||||
core.warning(`files_ignore_yaml: Duplicated key ${key} detected, the ${filePatterns[key]} will be overwritten by ${newIgnoreFilePatterns[key]}.`);
|
||||
}
|
||||
}
|
||||
filePatterns = {
|
||||
...filePatterns,
|
||||
...newIgnoreFilePatterns
|
||||
};
|
||||
}
|
||||
if (inputs.filesIgnoreYamlFromSourceFile) {
|
||||
const inputFilesIgnoreYamlFromSourceFile = inputs.filesIgnoreYamlFromSourceFile
|
||||
|
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
@ -1284,6 +1284,10 @@ export const getYamlFilePatterns = async ({
|
||||
)
|
||||
}
|
||||
}
|
||||
filePatterns = {
|
||||
...filePatterns,
|
||||
...newIgnoreFilePatterns
|
||||
}
|
||||
}
|
||||
|
||||
if (inputs.filesIgnoreYamlFromSourceFile) {
|
||||
|
1
test/new.md
Normal file
1
test/new.md
Normal file
@ -0,0 +1 @@
|
||||
This is a test markdown file
|
@ -1 +1 @@
|
||||
This is a test file.
|
||||
This is a test file...
|
||||
|
Loading…
x
Reference in New Issue
Block a user