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
+30-26Lines changed: 30 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,12 @@ arguments will be provided:
18
18
-`core` A reference to the [@actions/core](https://github.com/actions/toolkit/tree/main/packages/core) package
19
19
-`glob` A reference to the [@actions/glob](https://github.com/actions/toolkit/tree/main/packages/glob) package
20
20
-`io` A reference to the [@actions/io](https://github.com/actions/toolkit/tree/main/packages/io) package
21
+
-`require` A proxy wrapper around the normal Node.js `require` to enable
22
+
requiring relative paths (relative to the current working directory) and
23
+
requiring npm packages installed in the current working directory. If for
24
+
some reason you need the non-wrapped `require`, there is an escape hatch
25
+
available: `__original_require__` is the original value of `require` without
26
+
our wrapping applied.
21
27
22
28
Since the `script` is just a function body, these values will already be
23
29
defined, so you don't have to (see examples below).
@@ -38,7 +44,7 @@ The return value of the script will be in the step's outputs under the
38
44
"result" key.
39
45
40
46
```yaml
41
-
- uses: actions/github-script@v3
47
+
- uses: actions/github-script@v4
42
48
id: set-result
43
49
with:
44
50
script: return "Hello!"
@@ -57,7 +63,7 @@ output of a github-script step. For some workflows, string encoding is preferred
57
63
`result-encoding` input:
58
64
59
65
```yaml
60
-
- uses: actions/github-script@v3
66
+
- uses: actions/github-script@v4
61
67
id: my-script
62
68
with:
63
69
github-token: ${{secrets.GITHUB_TOKEN}}
@@ -76,7 +82,7 @@ By default, github-script will use the token provided to your workflow.
_Note that the script path given to `require()` must be an **absolute path** in this case, hence using [`GITHUB_WORKSPACE`](https://docs.github.com/en/actions/configuring-and-managing-workflows/using-environment-variables#default-environment-variables)._
0 commit comments