Compare commits

...

2 commits

Author SHA1 Message Date
Varun Sharma
6ae58d6818 feat: use hostname as correlation_id for Ubicloud runners 2025-12-10 09:26:22 -08:00
Varun Sharma
7bcfa200ad feat: support Ubicloud runners via UBICLOUD_RUNTIME_TOKEN 2025-12-10 09:01:28 -08:00
8 changed files with 18 additions and 10 deletions

3
dist/index.js vendored
View file

@ -32062,7 +32062,8 @@ function isTLSEnabled(owner) {
} }
function isGithubHosted() { function isGithubHosted() {
const runnerEnvironment = process.env.RUNNER_ENVIRONMENT || ""; const runnerEnvironment = process.env.RUNNER_ENVIRONMENT || "";
return runnerEnvironment === "github-hosted"; const hasUbicloudToken = !!process.env.UBICLOUD_RUNTIME_TOKEN;
return runnerEnvironment === "github-hosted" || hasUbicloudToken;
} }
// EXTERNAL MODULE: ./node_modules/@actions/github/lib/github.js // EXTERNAL MODULE: ./node_modules/@actions/github/lib/github.js

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

3
dist/post/index.js vendored
View file

@ -32110,7 +32110,8 @@ function isTLSEnabled(owner) {
} }
function isGithubHosted() { function isGithubHosted() {
const runnerEnvironment = process.env.RUNNER_ENVIRONMENT || ""; const runnerEnvironment = process.env.RUNNER_ENVIRONMENT || "";
return runnerEnvironment === "github-hosted"; const hasUbicloudToken = !!process.env.UBICLOUD_RUNTIME_TOKEN;
return runnerEnvironment === "github-hosted" || hasUbicloudToken;
} }
// EXTERNAL MODULE: ./node_modules/@actions/github/lib/github.js // EXTERNAL MODULE: ./node_modules/@actions/github/lib/github.js

File diff suppressed because one or more lines are too long

7
dist/pre/index.js vendored
View file

@ -85482,7 +85482,8 @@ function isTLSEnabled(owner) {
} }
function isGithubHosted() { function isGithubHosted() {
const runnerEnvironment = process.env.RUNNER_ENVIRONMENT || ""; const runnerEnvironment = process.env.RUNNER_ENVIRONMENT || "";
return runnerEnvironment === "github-hosted"; const hasUbicloudToken = !!process.env.UBICLOUD_RUNTIME_TOKEN;
return runnerEnvironment === "github-hosted" || hasUbicloudToken;
} }
// EXTERNAL MODULE: ./node_modules/@actions/tool-cache/lib/tool-cache.js // EXTERNAL MODULE: ./node_modules/@actions/tool-cache/lib/tool-cache.js
@ -85625,7 +85626,9 @@ var setup_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _ar
console.log(CONTAINER_MESSAGE); console.log(CONTAINER_MESSAGE);
return; return;
} }
var correlation_id = v4(); var correlation_id = process.env.UBICLOUD_RUNTIME_TOKEN
? (0,external_os_.hostname)()
: v4();
var api_url = configs_STEPSECURITY_API_URL; var api_url = configs_STEPSECURITY_API_URL;
var web_url = STEPSECURITY_WEB_URL; var web_url = STEPSECURITY_WEB_URL;
let confg = { let confg = {

File diff suppressed because one or more lines are too long

View file

@ -7,7 +7,7 @@ import { v4 as uuidv4 } from "uuid";
import * as common from "./common"; import * as common from "./common";
import isDocker from "is-docker"; import isDocker from "is-docker";
import { context } from "@actions/github"; import { context } from "@actions/github";
import { EOL } from "os"; import { EOL, hostname } from "os";
import { import {
ArtifactCacheEntry, ArtifactCacheEntry,
cacheKey, cacheKey,
@ -54,7 +54,9 @@ interface MonitorResponse {
return; return;
} }
var correlation_id = uuidv4(); var correlation_id = process.env.UBICLOUD_RUNTIME_TOKEN
? hostname()
: uuidv4();
var api_url = STEPSECURITY_API_URL; var api_url = STEPSECURITY_API_URL;
var web_url = STEPSECURITY_WEB_URL; var web_url = STEPSECURITY_WEB_URL;

View file

@ -25,5 +25,6 @@ export async function isTLSEnabled(owner: string): Promise<boolean> {
export function isGithubHosted() { export function isGithubHosted() {
const runnerEnvironment = process.env.RUNNER_ENVIRONMENT || ""; const runnerEnvironment = process.env.RUNNER_ENVIRONMENT || "";
return runnerEnvironment === "github-hosted"; const hasUbicloudToken = !!process.env.UBICLOUD_RUNTIME_TOKEN;
return runnerEnvironment === "github-hosted" || hasUbicloudToken;
} }