diff --git a/dist/index.js b/dist/index.js index 0779216..837172a 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1510,13 +1510,10 @@ function main() { const github = new _actions_github__WEBPACK_IMPORTED_MODULE_1__.GitHub(token, opts); const script = _actions_core__WEBPACK_IMPORTED_MODULE_0__.getInput('script', { required: true }); const fn = wrapFunction(script); - const result = yield vm__WEBPACK_IMPORTED_MODULE_2__.runInNewContext(fn, { - github, + const result = yield vm__WEBPACK_IMPORTED_MODULE_2__.runInNewContext(fn, Object.assign({}, global, { github, console, - context: _actions_github__WEBPACK_IMPORTED_MODULE_1__.context, - actions: { core: _actions_core__WEBPACK_IMPORTED_MODULE_0__ }, - require: __webpack_require__(875) // Otherwise, the build step will compile this incorrectly. - }, { + context: _actions_github__WEBPACK_IMPORTED_MODULE_1__.context, actions: { core: _actions_core__WEBPACK_IMPORTED_MODULE_0__ }, require: __webpack_require__(875) // Otherwise, the build step will compile this incorrectly. + }), { lineOffset: -1 }); let encoding = _actions_core__WEBPACK_IMPORTED_MODULE_0__.getInput('result-encoding'); diff --git a/src/main.ts b/src/main.ts index a9aa583..6c83915 100644 --- a/src/main.ts +++ b/src/main.ts @@ -21,6 +21,7 @@ async function main() { const result = await vm.runInNewContext( fn, { + ...global, github, console, context,