Skip to content

Commit 60834a0

Browse files
committed
Add exportVariable to ActionsEnv
1 parent e9831f7 commit 60834a0

3 files changed

Lines changed: 16 additions & 6 deletions

File tree

lib/entry-points.js

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

src/actions-util.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,18 @@ declare const __CODEQL_ACTION_VERSION__: string;
2929
export interface ActionsEnv {
3030
getRequiredInput: (name: string) => string;
3131
getOptionalInput: (name: string) => string | undefined;
32+
exportVariable: (name: string, value: string) => void;
3233
}
3334

3435
/**
3536
* Gets the real `ActionsEnv` used by production code.
3637
*/
3738
export function getActionsEnv(): ActionsEnv {
38-
return { getRequiredInput, getOptionalInput };
39+
return {
40+
getRequiredInput,
41+
getOptionalInput,
42+
exportVariable: core.exportVariable,
43+
};
3944
}
4045

4146
/**

src/testing-utils.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ export function getTestActionsEnv(): ActionsEnv {
191191
throw new Error(`Input required and not supplied: ${name}`);
192192
},
193193
getOptionalInput: () => undefined,
194+
exportVariable: () => {},
194195
};
195196
}
196197

0 commit comments

Comments
 (0)