Skip to content

Commit 97a91d9

Browse files
committed
Make platform+arch available in BaseState
1 parent 85c0c09 commit 97a91d9

3 files changed

Lines changed: 10 additions & 0 deletions

File tree

‎lib/entry-points.js‎

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/action-common.ts‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ export interface BaseState {
1919
name: ActionName;
2020
/** When the Action was started. */
2121
startedAt: Date;
22+
/** The platform the Action is running on. */
23+
platform: NodeJS.Platform;
24+
/** The architecture of the host. */
25+
arch: NodeJS.Architecture;
2226
}
2327

2428
/** Describes different state features that an Action may have. */
@@ -98,6 +102,8 @@ export async function runInActions(action: Action) {
98102
const actionState = {
99103
name: action.name,
100104
startedAt,
105+
platform: process.platform,
106+
arch: process.arch,
101107
logger,
102108
env,
103109
actions: actionsEnv,

‎src/testing-utils.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,8 @@ export function initAllState(
234234
return {
235235
name: ActionName.Init,
236236
startedAt: new Date(),
237+
platform: process.platform,
238+
arch: process.arch,
237239
logger: new RecordingLogger(),
238240
env,
239241
actions: getTestActionsEnv(env),

0 commit comments

Comments
 (0)