Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b2c461f

Browse filesBrowse files
committed
Include @actions/io
1 parent 048309c commit b2c461f
Copy full SHA for b2c461f

File tree

6 files changed

+517
-4
lines changed
Filter options

6 files changed

+517
-4
lines changed

‎README.md

Copy file name to clipboardExpand all lines: README.md
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ arguments will be provided:
1212
- `context` An object containing the [context of the workflow
1313
run](https://github.com/actions/toolkit/tree/master/packages/github)
1414
- `core` A reference to the [@actions/core](https://github.com/actions/toolkit/tree/master/packages/core) package
15+
- `io` A reference to the [@actions/io](https://github.com/actions/toolkit/tree/master/packages/io) package
1516

1617
Since the `script` is just a function body, these values will already be
1718
defined, so you don't have to (see examples below).

‎dist/index.js

Copy file name to clipboardExpand all lines: dist/index.js
+505-2Lines changed: 505 additions & 2 deletions
Large diffs are not rendered by default.

‎package-lock.json

Copy file name to clipboardExpand all lines: package-lock.json
+5Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

Copy file name to clipboardExpand all lines: package.json
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@
3636
},
3737
"dependencies": {
3838
"@actions/core": "^1.2.4",
39-
"@actions/github": "^2.2.0"
39+
"@actions/github": "^2.2.0",
40+
"@actions/io": "^1.0.2"
4041
},
4142
"devDependencies": {
4243
"@types/jest": "^25.1.4",

‎src/async-function.ts

Copy file name to clipboardExpand all lines: src/async-function.ts
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
import * as core from '@actions/core'
22
import {GitHub} from '@actions/github'
33
import {Context} from '@actions/github/lib/context'
4+
import * as io from '@actions/io'
45

56
const AsyncFunction = Object.getPrototypeOf(async () => null).constructor
67

78
type AsyncFunctionArguments = {
89
context: Context
910
core: typeof core
1011
github: GitHub
12+
io: typeof io
1113
require: NodeRequire
1214
}
1315

‎src/main.ts

Copy file name to clipboardExpand all lines: src/main.ts
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as core from '@actions/core'
22
import {context, GitHub} from '@actions/github'
3+
import * as io from '@actions/io'
34
import {callAsyncFunction} from './async-function'
45

56
process.on('unhandledRejection', handleError)
@@ -27,7 +28,7 @@ async function main(): Promise<void> {
2728

2829
// Using property/value shorthand on `require` (e.g. `{require}`) causes compilation errors.
2930
const result = await callAsyncFunction(
30-
{require: require, github, context, core},
31+
{require: require, github, context, core, io},
3132
script
3233
)
3334

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.