mirror of
https://github.com/actions/github-script.git
synced 2025-12-08 08:06:23 +00:00
Separate integration workflow
This commit is contained in:
15
.github/workflows/ci.yml
vendored
15
.github/workflows/ci.yml
vendored
@@ -3,20 +3,7 @@ on:
|
||||
pull_request: {branches: master}
|
||||
|
||||
jobs:
|
||||
integration:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: output-set
|
||||
uses: actions/github-script@master
|
||||
with:
|
||||
script: |
|
||||
core.setOutput('result', 'test')
|
||||
- run: |
|
||||
if [[ "${{steps.output-set.outputs.result}}" != "test" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
jest:
|
||||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
16
.github/workflows/integration.yml
vendored
Normal file
16
.github/workflows/integration.yml
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
on:
|
||||
push: {branches: integration-workflow}
|
||||
|
||||
jobs:
|
||||
integration:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- id: output-set
|
||||
uses: actions/github-script@integration-workflow
|
||||
with:
|
||||
script: return 'test'
|
||||
result-encoding: string
|
||||
- run: |
|
||||
if [[ "${{steps.output-set.outputs.result}}" != "test" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
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, core: core }, script);
|
||||
const result = await 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;
|
||||
|
||||
@@ -18,7 +18,7 @@ async function main() {
|
||||
const script = core.getInput('script', {required: true})
|
||||
|
||||
// Using property/value shorthand on `require` (e.g. `{require}`) causes compilatin errors.
|
||||
const result = callAsyncFunction(
|
||||
const result = await callAsyncFunction(
|
||||
{require: require, github: github, context: context, core: core},
|
||||
script
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user