feat: add any_added to outputs (#2567)
Signed-off-by: Jellyfrog <Jellyfrog@users.noreply.github.com>
This commit is contained in:
@@ -250,6 +250,8 @@ outputs:
|
||||
description: "Returns only files that are Added (A)."
|
||||
added_files_count:
|
||||
description: "Returns the number of `added_files`"
|
||||
any_added:
|
||||
description: "Returns `true` when any of the filenames provided using the `files*` or `files_ignore*` inputs have been added."
|
||||
copied_files:
|
||||
description: "Returns only files that are Copied (C)."
|
||||
copied_files_count:
|
||||
|
||||
7
dist/index.js
generated
vendored
7
dist/index.js
generated
vendored
@@ -452,6 +452,13 @@ const setOutputsAndGetModifiedAndChangedFilesStatus = async ({ allDiffFiles, all
|
||||
writeOutputFiles: inputs.writeOutputFiles,
|
||||
outputDir: inputs.outputDir
|
||||
});
|
||||
await (0, utils_1.setOutput)({
|
||||
key: (0, utils_1.getOutputKey)('any_added', outputPrefix),
|
||||
value: addedFiles.paths.length > 0,
|
||||
writeOutputFiles: inputs.writeOutputFiles,
|
||||
outputDir: inputs.outputDir,
|
||||
json: inputs.json
|
||||
});
|
||||
const copiedFiles = await (0, changedFiles_1.getChangeTypeFiles)({
|
||||
inputs,
|
||||
changedFiles: allFilteredDiffFiles,
|
||||
|
||||
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
@@ -52,6 +52,13 @@ export const setOutputsAndGetModifiedAndChangedFilesStatus = async ({
|
||||
writeOutputFiles: inputs.writeOutputFiles,
|
||||
outputDir: inputs.outputDir
|
||||
})
|
||||
await setOutput({
|
||||
key: getOutputKey('any_added', outputPrefix),
|
||||
value: addedFiles.paths.length > 0,
|
||||
writeOutputFiles: inputs.writeOutputFiles,
|
||||
outputDir: inputs.outputDir,
|
||||
json: inputs.json
|
||||
})
|
||||
|
||||
const copiedFiles = await getChangeTypeFiles({
|
||||
inputs,
|
||||
|
||||
Reference in New Issue
Block a user