mirror of
https://github.com/github/codeql-action.git
synced 2026-01-01 20:20:07 +08:00
Run the pack download command
This commit is contained in:
20
lib/init-action.js
generated
20
lib/init-action.js
generated
@@ -7,7 +7,11 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
||||
return result;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const fs = __importStar(require("fs"));
|
||||
const os = __importStar(require("os"));
|
||||
const path = __importStar(require("path"));
|
||||
const core = __importStar(require("@actions/core"));
|
||||
const yaml = __importStar(require("js-yaml"));
|
||||
const actions_util_1 = require("./actions-util");
|
||||
const init_1 = require("./init");
|
||||
const languages_1 = require("./languages");
|
||||
@@ -82,6 +86,22 @@ async function run() {
|
||||
logger.warning(`${err.message} You can call this action with 'setup-python-dependencies: false' to disable this process`);
|
||||
}
|
||||
}
|
||||
////////////////////////////////
|
||||
// TODO This should not happen in the action, we should be able to
|
||||
// generate the default qlconfig from the CLI
|
||||
// DO NOT COMMIT THIS
|
||||
const defaultQlConfig = {
|
||||
registryKind: "docker",
|
||||
registries: [
|
||||
{
|
||||
url: "https://ghcr.io/v2/",
|
||||
packages: "*",
|
||||
},
|
||||
],
|
||||
};
|
||||
fs.mkdirSync(path.join(os.homedir(), ".codeql"));
|
||||
fs.writeFileSync(path.join(os.homedir(), ".codeql", "qlconfig.yml"), yaml.safeDump(defaultQlConfig), "utf8");
|
||||
////////////////////////////////
|
||||
}
|
||||
catch (e) {
|
||||
core.setFailed(e.message);
|
||||
|
||||
Reference in New Issue
Block a user