mirror of
https://github.com/tj-actions/changed-files
synced 2025-05-17 20:00:34 +02:00
fix: bug modified_keys and changed_key outputs not set when no changes detected (#2509)
This commit is contained in:
parent
b74df86ccb
commit
6cb76d07be
3 changed files with 21 additions and 29 deletions
24
dist/index.js
generated
vendored
24
dist/index.js
generated
vendored
|
@ -97,20 +97,16 @@ const processChangedFiles = async ({ filePatterns, allDiffFiles, inputs, yamlFil
|
|||
core.info('All Done!');
|
||||
core.endGroup();
|
||||
}
|
||||
if (modifiedKeys.length > 0) {
|
||||
await (0, utils_1.setArrayOutput)({
|
||||
key: 'modified_keys',
|
||||
inputs,
|
||||
value: modifiedKeys
|
||||
});
|
||||
}
|
||||
if (changedKeys.length > 0) {
|
||||
await (0, utils_1.setArrayOutput)({
|
||||
key: 'changed_keys',
|
||||
inputs,
|
||||
value: changedKeys
|
||||
});
|
||||
}
|
||||
await (0, utils_1.setArrayOutput)({
|
||||
key: 'modified_keys',
|
||||
inputs,
|
||||
value: modifiedKeys
|
||||
});
|
||||
await (0, utils_1.setArrayOutput)({
|
||||
key: 'changed_keys',
|
||||
inputs,
|
||||
value: changedKeys
|
||||
});
|
||||
}
|
||||
if (filePatterns.length === 0 && Object.keys(yamlFilePatterns).length === 0) {
|
||||
core.startGroup('changed-files-all');
|
||||
|
|
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
|
@ -89,21 +89,17 @@ export const processChangedFiles = async ({
|
|||
core.endGroup()
|
||||
}
|
||||
|
||||
if (modifiedKeys.length > 0) {
|
||||
await setArrayOutput({
|
||||
key: 'modified_keys',
|
||||
inputs,
|
||||
value: modifiedKeys
|
||||
})
|
||||
}
|
||||
await setArrayOutput({
|
||||
key: 'modified_keys',
|
||||
inputs,
|
||||
value: modifiedKeys
|
||||
})
|
||||
|
||||
if (changedKeys.length > 0) {
|
||||
await setArrayOutput({
|
||||
key: 'changed_keys',
|
||||
inputs,
|
||||
value: changedKeys
|
||||
})
|
||||
}
|
||||
await setArrayOutput({
|
||||
key: 'changed_keys',
|
||||
inputs,
|
||||
value: changedKeys
|
||||
})
|
||||
}
|
||||
|
||||
if (filePatterns.length === 0 && Object.keys(yamlFilePatterns).length === 0) {
|
||||
|
|
Loading…
Add table
Reference in a new issue