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