diff --git a/src/main.ts b/src/main.ts index 58aeb19d7..7f31ed62e 100644 --- a/src/main.ts +++ b/src/main.ts @@ -161,7 +161,11 @@ export async function run(): Promise { core.setOutput('paths-output-file', pathsOutputFile) core.saveState('paths-output-file', pathsOutputFile) - } else if (filePatterns && !pathsOutput) { + } else if ( + !pathsOutput && + filePatterns.split('\n').filter(p => !DEFAULT_EXCLUDED_FILES.includes(p)) + .length > 0 + ) { core.warning( 'No match found for specified patterns. Ensure that subdirectory patterns a prefixed with "**/". See: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet' )