You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-11
Original file line number
Diff line number
Diff line change
@@ -4,15 +4,15 @@ A workflow wrapping https://github.com/actions/github-script with Typescript fun
4
4
5
5
## Features
6
6
7
-
- Enables easily running Typescript functions exported from a module like the one in [`.github/`](./.github/) in Actions workflows. Builds and caches build results automatically.
8
-
-Allows writing tests for your scripts and running them locally with `npm test`.
7
+
- Enables easily running Typescript functions exported from a tiny private module like the one in [`.github/`](./.github/) in Actions workflows. Caches build results automatically.
8
+
-Enables a local testing workflow for advanced Actions logic.
9
9
- Provides a superior experience to editing Javascript embedded in YAML.
10
10
11
11
## Usage
12
12
13
13
### Writing scripts
14
14
15
-
The `@urcomputeringpal/github-script-ts` package contains a type definition for the [arguments](https://github.com/actions/github-script#actionsgithub-script) passed to your script. Put all of these files in `.github` to create scripts of your own:
15
+
The [`@urcomputeringpal/github-script-ts`](https://www.npmjs.com/package/@urcomputeringpal/github-script-ts) package contains a type definition for the [arguments](https://github.com/actions/github-script#actionsgithub-script) passed to your script. Put all of these files in `.github` to create scripts of your own:
16
16
17
17
#### `src/function1.ts`
18
18
@@ -66,19 +66,13 @@ export { function1 } from "./function1";
66
66
67
67
### Running your script in a workflow
68
68
69
+
See [`action.yml`](./action.yml) for all accepted inputs.
70
+
69
71
```yaml
70
72
- name: Checkout repository
71
73
uses: actions/checkout@v3
72
74
73
75
# Perform setup. Caches build results with actions/cache.
74
-
# Expects a package.json with a "build" script that exports
75
-
# functions that accept the following arguments
76
-
# (see .github/src/types.ts):
77
-
#
78
-
# * github - A pre-authenticated octokit/rest.js client with pagination plugins
79
-
# * context - An object containing the context of the workflow run
80
-
# * core - A reference to the @actions/core package
81
-
82
76
- name: Setup TypeScript scripts
83
77
uses: urcomputeringpal/github-script-ts@v0
84
78
@@ -91,6 +85,13 @@ export { function1 } from "./function1";
0 commit comments