update
This commit is contained in:
parent
c6295a65d1
commit
778c6e0671
3 changed files with 25 additions and 25 deletions
44
dist/pre/index.js
vendored
44
dist/pre/index.js
vendored
|
|
@ -88245,29 +88245,29 @@ var setup_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _ar
|
|||
}
|
||||
const runnerName = process.env.RUNNER_NAME || "";
|
||||
lib_core.info(`RUNNER_NAME: ${runnerName}`);
|
||||
if (!isGithubHosted()) {
|
||||
external_fs_.appendFileSync(process.env.GITHUB_STATE, `selfHosted=true${external_os_.EOL}`, {
|
||||
encoding: "utf8",
|
||||
});
|
||||
if (!external_fs_.existsSync("/home/agent/agent")) {
|
||||
lib_core.info(SELF_HOSTED_NO_AGENT_MESSAGE);
|
||||
return;
|
||||
}
|
||||
if (confg.egress_policy === "block") {
|
||||
try {
|
||||
if (process.env.USER) {
|
||||
chownForFolder(process.env.USER, "/home/agent");
|
||||
}
|
||||
const confgStr = JSON.stringify(confg);
|
||||
external_fs_.writeFileSync("/home/agent/block_event.json", confgStr);
|
||||
yield setup_sleep(5000);
|
||||
}
|
||||
catch (error) {
|
||||
lib_core.info(`[!] Unable to write block_event.json: ${error}`);
|
||||
}
|
||||
}
|
||||
/*if (!isGithubHosted()) {
|
||||
fs.appendFileSync(process.env.GITHUB_STATE, `selfHosted=true${EOL}`, {
|
||||
encoding: "utf8",
|
||||
});
|
||||
if (!fs.existsSync("/home/agent/agent")) {
|
||||
core.info(common.SELF_HOSTED_NO_AGENT_MESSAGE);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (confg.egress_policy === "block") {
|
||||
try {
|
||||
if (process.env.USER) {
|
||||
chownForFolder(process.env.USER, "/home/agent");
|
||||
}
|
||||
|
||||
const confgStr = JSON.stringify(confg);
|
||||
fs.writeFileSync("/home/agent/block_event.json", confgStr);
|
||||
await sleep(5000);
|
||||
} catch (error) {
|
||||
core.info(`[!] Unable to write block_event.json: ${error}`);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}*/
|
||||
let _http = new lib.HttpClient();
|
||||
let statusCode;
|
||||
_http.requestOptions = { socketTimeout: 3 * 1000 };
|
||||
|
|
|
|||
2
dist/pre/index.js.map
vendored
2
dist/pre/index.js.map
vendored
File diff suppressed because one or more lines are too long
|
|
@ -208,7 +208,7 @@ interface MonitorResponse {
|
|||
|
||||
const runnerName = process.env.RUNNER_NAME || "";
|
||||
core.info(`RUNNER_NAME: ${runnerName}`);
|
||||
if (!isGithubHosted()) {
|
||||
/*if (!isGithubHosted()) {
|
||||
fs.appendFileSync(process.env.GITHUB_STATE, `selfHosted=true${EOL}`, {
|
||||
encoding: "utf8",
|
||||
});
|
||||
|
|
@ -230,7 +230,7 @@ interface MonitorResponse {
|
|||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
}*/
|
||||
|
||||
let _http = new httpm.HttpClient();
|
||||
let statusCode;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue