Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the @actions/tool-cache package #450

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ The following arguments will be provided:
- `glob` A reference to the [@actions/glob](https://github.com/actions/toolkit/tree/main/packages/glob) package
- `io` A reference to the [@actions/io](https://github.com/actions/toolkit/tree/main/packages/io) package
- `exec` A reference to the [@actions/exec](https://github.com/actions/toolkit/tree/main/packages/exec) package
- `tc` A reference to the [@actions/tool-cache](https://github.com/actions/toolkit/tree/main/packages/tool-cache) package
- `require` A proxy wrapper around the normal Node.js `require` to enable
requiring relative paths (relative to the current working directory) and
requiring npm packages installed in the current working directory. If for
Expand Down
2,637 changes: 2,636 additions & 1 deletion dist/index.js

Large diffs are not rendered by default.

56 changes: 56 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"@actions/github": "^6.0.0",
"@actions/glob": "^0.4.0",
"@actions/io": "^1.1.3",
"@actions/tool-cache": "^2.0.1",
"@octokit/core": "^5.0.1",
"@octokit/plugin-request-log": "^4.0.0",
"@octokit/plugin-retry": "^6.0.1",
Expand Down
2 changes: 2 additions & 0 deletions src/async-function.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ 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'
import * as tc from '@actions/tool-cache'

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

Expand All @@ -14,6 +15,7 @@ export declare type AsyncFunctionArguments = {
exec: typeof exec
glob: typeof glob
io: typeof io
tc: typeof tc
require: NodeRequire
__original_require__: NodeRequire
}
Expand Down
4 changes: 3 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {context, getOctokit} from '@actions/github'
import {defaults as defaultGitHubOptions} from '@actions/github/lib/utils'
import * as glob from '@actions/glob'
import * as io from '@actions/io'
import * as tc from '@actions/tool-cache'
import {requestLog} from '@octokit/plugin-request-log'
import {retry} from '@octokit/plugin-retry'
import {RequestRequestOptions} from '@octokit/types'
Expand Down Expand Up @@ -66,7 +67,8 @@ async function main(): Promise<void> {
core,
exec,
glob,
io
io,
tc
},
script
)
Expand Down
2 changes: 2 additions & 0 deletions types/async-function.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@ 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';
import * as tc from '@actions/tool-cache';
export declare type AsyncFunctionArguments = {
context: Context;
core: typeof core;
github: InstanceType<typeof GitHub>;
exec: typeof exec;
glob: typeof glob;
io: typeof io;
tc: typeof tc;
require: NodeRequire;
__original_require__: NodeRequire;
};
Expand Down