mirror of
https://github.com/step-security/harden-runner.git
synced 2026-06-05 19:53:33 +00:00
Add call to monitor run
This commit is contained in:
parent
9e1d53e0c9
commit
8ab8a7238e
5 changed files with 14 additions and 3 deletions
5
dist/pre/index.js
vendored
5
dist/pre/index.js
vendored
|
|
@ -2370,6 +2370,8 @@ const validate = dist/* validate */.Gu;
|
|||
const stringify = dist/* stringify */.Pz;
|
||||
const parse = dist/* parse */.Qc;
|
||||
|
||||
// EXTERNAL MODULE: ./node_modules/@actions/http-client/index.js
|
||||
var http_client = __nccwpck_require__(925);
|
||||
;// CONCATENATED MODULE: ./src/setup.ts
|
||||
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
|
|
@ -2386,6 +2388,7 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
|
|||
|
||||
|
||||
|
||||
|
||||
(() => __awaiter(void 0, void 0, void 0, function* () {
|
||||
try {
|
||||
if (process.platform !== "linux") {
|
||||
|
|
@ -2404,6 +2407,8 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
|
|||
api_url: api_url,
|
||||
allowed_endpoints: core.getInput("allowed-endpoints"),
|
||||
};
|
||||
let _http = new http_client.HttpClient();
|
||||
yield _http.get(`${api_url}/v1/github/${process.env["GITHUB_REPOSITORY"]}/actions/runs/${process.env["GITHUB_RUN_ID"]}/monitor`);
|
||||
const confgStr = JSON.stringify(confg);
|
||||
external_child_process_namespaceObject.execSync("sudo mkdir -p /home/agent");
|
||||
external_child_process_namespaceObject.execSync("sudo chown -R $USER /home/agent");
|
||||
|
|
|
|||
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
5
package-lock.json
generated
5
package-lock.json
generated
|
|
@ -1,17 +1,18 @@
|
|||
{
|
||||
"name": "step-security-harden-runner",
|
||||
"version": "0.0.1",
|
||||
"version": "0.1.0",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "step-security-harden-runner",
|
||||
"version": "0.0.1",
|
||||
"version": "0.1.0",
|
||||
"license": "Apache License 2.0",
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.5.0",
|
||||
"@actions/exec": "^1.1.0",
|
||||
"@actions/github": "^5.0.0",
|
||||
"@actions/http-client": "^1.0.11",
|
||||
"node-fetch": "^2.6.1",
|
||||
"uuid": "^8.3.2"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@
|
|||
"@actions/core": "^1.5.0",
|
||||
"@actions/exec": "^1.1.0",
|
||||
"@actions/github": "^5.0.0",
|
||||
"@actions/http-client": "^1.0.11",
|
||||
"node-fetch": "^2.6.1",
|
||||
"uuid": "^8.3.2"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import * as fs from "fs";
|
|||
import * as https from "https";
|
||||
import * as path from "path";
|
||||
import { v4 as uuidv4 } from "uuid";
|
||||
import * as httpm from "@actions/http-client";
|
||||
|
||||
(async () => {
|
||||
try {
|
||||
|
|
@ -27,6 +28,9 @@ import { v4 as uuidv4 } from "uuid";
|
|||
allowed_endpoints: core.getInput("allowed-endpoints"),
|
||||
};
|
||||
|
||||
let _http = new httpm.HttpClient();
|
||||
await _http.get(`${api_url}/v1/github/${process.env["GITHUB_REPOSITORY"]}/actions/runs/${process.env["GITHUB_RUN_ID"]}/monitor`);
|
||||
|
||||
const confgStr = JSON.stringify(confg);
|
||||
cp.execSync("sudo mkdir -p /home/agent");
|
||||
cp.execSync("sudo chown -R $USER /home/agent");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue