Run the pack download command

This commit is contained in:
Andrew Eisenberg
2021-06-04 13:44:24 -07:00
parent 06687e95c8
commit d87945e9fd
9 changed files with 73 additions and 7 deletions

20
lib/init-action.js generated
View File

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