adding @actions/exec
This commit is contained in:
Vendored
+754
File diff suppressed because it is too large
Load Diff
Generated
+23
-9097
File diff suppressed because it is too large
Load Diff
@@ -36,6 +36,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.2.7",
|
"@actions/core": "^1.2.7",
|
||||||
|
"@actions/exec": "^1.1.0",
|
||||||
"@actions/github": "^4.0.0",
|
"@actions/github": "^4.0.0",
|
||||||
"@actions/glob": "^0.1.1",
|
"@actions/glob": "^0.1.1",
|
||||||
"@actions/io": "^1.0.2",
|
"@actions/io": "^1.0.2",
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import * as core from '@actions/core'
|
import * as core from '@actions/core'
|
||||||
import {Context} from '@actions/github/lib/context'
|
import * as exec from '@actions/exec'
|
||||||
import {GitHub} from '@actions/github/lib/utils'
|
import { Context } from '@actions/github/lib/context'
|
||||||
|
import { GitHub } from '@actions/github/lib/utils'
|
||||||
import * as glob from '@actions/glob'
|
import * as glob from '@actions/glob'
|
||||||
import * as io from '@actions/io'
|
import * as io from '@actions/io'
|
||||||
|
|
||||||
@@ -10,6 +11,7 @@ type AsyncFunctionArguments = {
|
|||||||
context: Context
|
context: Context
|
||||||
core: typeof core
|
core: typeof core
|
||||||
github: InstanceType<typeof GitHub>
|
github: InstanceType<typeof GitHub>
|
||||||
|
exec: typeof exec
|
||||||
glob: typeof glob
|
glob: typeof glob
|
||||||
io: typeof io
|
io: typeof io
|
||||||
require: NodeRequire
|
require: NodeRequire
|
||||||
|
|||||||
+7
-5
@@ -1,9 +1,10 @@
|
|||||||
import * as core from '@actions/core'
|
import * as core from '@actions/core'
|
||||||
import {context, getOctokit} from '@actions/github'
|
import * as exec from '@actions/exec'
|
||||||
|
import { context, getOctokit } from '@actions/github'
|
||||||
import * as glob from '@actions/glob'
|
import * as glob from '@actions/glob'
|
||||||
import * as io from '@actions/io'
|
import * as io from '@actions/io'
|
||||||
import {callAsyncFunction} from './async-function'
|
import { callAsyncFunction } from './async-function'
|
||||||
import {wrapRequire} from './wrap-require'
|
import { wrapRequire } from './wrap-require'
|
||||||
|
|
||||||
process.on('unhandledRejection', handleError)
|
process.on('unhandledRejection', handleError)
|
||||||
main().catch(handleError)
|
main().catch(handleError)
|
||||||
@@ -15,7 +16,7 @@ type Options = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function main(): Promise<void> {
|
async function main(): Promise<void> {
|
||||||
const token = core.getInput('github-token', {required: true})
|
const token = core.getInput('github-token', { required: true })
|
||||||
const debug = core.getInput('debug')
|
const debug = core.getInput('debug')
|
||||||
const userAgent = core.getInput('user-agent')
|
const userAgent = core.getInput('user-agent')
|
||||||
const previews = core.getInput('previews')
|
const previews = core.getInput('previews')
|
||||||
@@ -26,7 +27,7 @@ async function main(): Promise<void> {
|
|||||||
if (previews != null) opts.previews = previews.split(',')
|
if (previews != null) opts.previews = previews.split(',')
|
||||||
|
|
||||||
const github = getOctokit(token, opts)
|
const github = getOctokit(token, opts)
|
||||||
const script = core.getInput('script', {required: true})
|
const script = core.getInput('script', { required: true })
|
||||||
|
|
||||||
// Using property/value shorthand on `require` (e.g. `{require}`) causes compilation errors.
|
// Using property/value shorthand on `require` (e.g. `{require}`) causes compilation errors.
|
||||||
const result = await callAsyncFunction(
|
const result = await callAsyncFunction(
|
||||||
@@ -36,6 +37,7 @@ async function main(): Promise<void> {
|
|||||||
github,
|
github,
|
||||||
context,
|
context,
|
||||||
core,
|
core,
|
||||||
|
exec,
|
||||||
glob,
|
glob,
|
||||||
io
|
io
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user