Move getJobUUID call into runInActions for init and setup-codeql

This commit is contained in:
Michael B. Gale
2026-07-29 14:27:24 +01:00
parent 0cebd1d28d
commit b411bbcd4a
4 changed files with 12 additions and 14 deletions

8
lib/entry-points.js generated
View File

@@ -146700,13 +146700,15 @@ async function runInActions(action) {
const env = getEnv();
const actionsEnv = getActionsEnv();
try {
await action.run({
const actionState = {
name: action.name,
startedAt,
logger,
env,
actions: actionsEnv
});
};
getJobUUID(actionState);
await action.run(actionState);
} catch (error3) {
core8.setFailed(
`${getDisplayActionName(action.name)} action failed: ${getErrorMessage(error3)}`
@@ -160779,7 +160781,6 @@ async function run3(actionState) {
logger
);
const repositoryProperties = repositoryPropertiesResult.orElse({});
getJobUUID(actionState);
core21.exportVariable("CODEQL_ACTION_INIT_HAS_RUN" /* INIT_ACTION_HAS_RUN */, "true");
sourceRoot = path24.resolve(
getRequiredEnvParam("GITHUB_WORKSPACE"),
@@ -161777,7 +161778,6 @@ async function run6(actionState) {
);
const repositoryProperties = repositoryPropertiesResult.orElse({});
const actionStateWithFeatures = { ...actionState, features };
getJobUUID(actionState);
const statusReportBase = await createStatusReportBase(
"setup-codeql" /* SetupCodeQL */,
"starting",

View File

@@ -8,6 +8,7 @@ import { getActionsLogger, Logger } from "./logging";
import {
ActionName,
getDisplayActionName,
getJobUUID,
sendUnhandledErrorStatusReport,
} from "./status-report";
import { getEnv, getErrorMessage } from "./util";
@@ -88,13 +89,18 @@ export async function runInActions(action: Action) {
const actionsEnv = getActionsEnv();
try {
await action.run({
const actionState = {
name: action.name,
startedAt,
logger,
env,
actions: actionsEnv,
});
};
// Create a unique identifier for this run.
getJobUUID(actionState);
await action.run(actionState);
} catch (error) {
core.setFailed(
`${getDisplayActionName(action.name)} action failed: ${getErrorMessage(error)}`,

View File

@@ -68,7 +68,6 @@ import {
createInitWithConfigStatusReport,
createStatusReportBase,
getActionsStatus,
getJobUUID,
sendStatusReport,
} from "./status-report";
import { ToolsDownloadStatusReport } from "./tools-download";
@@ -255,9 +254,6 @@ async function run(
);
const repositoryProperties = repositoryPropertiesResult.orElse({});
// Create a unique identifier for this run.
getJobUUID(actionState);
core.exportVariable(EnvVar.INIT_ACTION_HAS_RUN, "true");
// path.resolve() respects the intended semantics of source-root. If

View File

@@ -25,7 +25,6 @@ import {
InitToolsDownloadFields,
createStatusReportBase,
getActionsStatus,
getJobUUID,
sendStatusReport,
} from "./status-report";
import { ToolsDownloadStatusReport } from "./tools-download";
@@ -140,9 +139,6 @@ async function run(
const actionStateWithFeatures = { ...actionState, features };
// Create a unique identifier for this run.
getJobUUID(actionState);
const statusReportBase = await createStatusReportBase(
ActionName.SetupCodeQL,
"starting",