mirror of
https://github.com/actions/github-script.git
synced 2025-12-08 16:16:21 +00:00
Add core
This commit is contained in:
1
.github/workflows/ci.yml
vendored
1
.github/workflows/ci.yml
vendored
@@ -10,7 +10,6 @@ jobs:
|
||||
uses: actions/github-script@master
|
||||
with:
|
||||
script: |
|
||||
const core = require('@actions/core')
|
||||
core.setOutput('result', 'test')
|
||||
- run: |
|
||||
if [[ "${{steps.output-set.outputs.result}}" != "test" ]]; then
|
||||
|
||||
2
dist/index.js
vendored
2
dist/index.js
vendored
@@ -9178,7 +9178,7 @@ async function main() {
|
||||
const github = new lib_github.GitHub(token, opts);
|
||||
const script = Object(core.getInput)('script', { required: true });
|
||||
// Using property/value shorthand on `require` (e.g. `{require}`) causes compilatin errors.
|
||||
const result = callAsyncFunction({ require: __webpack_require__(875), github: github, context: lib_github.context }, script);
|
||||
const result = callAsyncFunction({ require: __webpack_require__(875), github: github, context: lib_github.context, core: core }, script);
|
||||
let encoding = Object(core.getInput)('result-encoding');
|
||||
encoding = encoding ? encoding : 'json';
|
||||
let output;
|
||||
|
||||
@@ -19,7 +19,7 @@ async function main() {
|
||||
|
||||
// Using property/value shorthand on `require` (e.g. `{require}`) causes compilatin errors.
|
||||
const result = callAsyncFunction(
|
||||
{require: require, github: github, context: context},
|
||||
{require: require, github: github, context: context, core: core},
|
||||
script
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user