We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 486ab5a commit a1a82f7Copy full SHA for a1a82f7
1 file changed
src/init-action.ts
@@ -298,7 +298,24 @@ async function run() {
298
299
core.exportVariable(EnvVar.INIT_ACTION_HAS_RUN, "true");
300
301
- const configFile = getOptionalInput("config-file");
+ let configFile = getOptionalInput("config-file");
302
+ if (configFile === undefined) {
303
+ const defaultLocation = path.join(
304
+ getRequiredEnvParam("GITHUB_WORKSPACE"),
305
+ ".github",
306
+ "codeql",
307
+ "codeql.yml",
308
+ );
309
+
310
+ if (fs.existsSync(defaultLocation)) {
311
+ configFile = defaultLocation;
312
+ logger.info(
313
+ `Using default config file location: ${path.resolve(configFile)}`,
314
315
+ } else {
316
+ logger.info("No config file found.");
317
+ }
318
319
320
try {
321
const statusReportBase = await createStatusReportBase(
0 commit comments