From 97a91d98616125e95e89676ea305057282666c3d Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Mon, 28 Sep 2026 19:03:35 +0100 Subject: [PATCH] Make `platform`+`arch` available in `BaseState` --- lib/entry-points.js | 2 ++ src/action-common.ts | 6 ++++++ src/testing-utils.ts | 2 ++ 3 files changed, 10 insertions(+) diff --git a/lib/entry-points.js b/lib/entry-points.js index 62b043f7b..5a8e49bc9 100644 --- a/lib/entry-points.js +++ b/lib/entry-points.js @@ -147730,6 +147730,8 @@ async function runInActions(action) { const actionState = { name: action.name, startedAt, + platform: process.platform, + arch: process.arch, logger, env, actions: actionsEnv diff --git a/src/action-common.ts b/src/action-common.ts index 95323e7f2..17d4344cc 100644 --- a/src/action-common.ts +++ b/src/action-common.ts @@ -19,6 +19,10 @@ export interface BaseState { name: ActionName; /** When the Action was started. */ startedAt: Date; + /** The platform the Action is running on. */ + platform: NodeJS.Platform; + /** The architecture of the host. */ + arch: NodeJS.Architecture; } /** Describes different state features that an Action may have. */ @@ -98,6 +102,8 @@ export async function runInActions(action: Action) { const actionState = { name: action.name, startedAt, + platform: process.platform, + arch: process.arch, logger, env, actions: actionsEnv, diff --git a/src/testing-utils.ts b/src/testing-utils.ts index f15cee2e7..a5ba50554 100644 --- a/src/testing-utils.ts +++ b/src/testing-utils.ts @@ -234,6 +234,8 @@ export function initAllState( return { name: ActionName.Init, startedAt: new Date(), + platform: process.platform, + arch: process.arch, logger: new RecordingLogger(), env, actions: getTestActionsEnv(env),