fix: bug modified_keys and changed_key outputs not set when no changes detected (#2509)

This commit is contained in:
Tonye Jack 2025-04-03 10:44:43 -06:00 committed by GitHub
parent b74df86ccb
commit 6cb76d07be
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 21 additions and 29 deletions

24
dist/index.js generated vendored
View file

@ -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

File diff suppressed because one or more lines are too long

View file

@ -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) {