mirror of
https://github.com/actions/github-script.git
synced 2026-02-07 19:47:26 +00:00
Adds note that absolute path is required
An absolute path is required when calling `require()` from within the github-script
This commit is contained in:
parent
1ba1e95cf2
commit
c19d6ba8b3
1 changed files with 1 additions and 0 deletions
|
|
@ -202,6 +202,7 @@ jobs:
|
||||||
const scriptPath = path.resolve('./path/to/script.js')
|
const scriptPath = path.resolve('./path/to/script.js')
|
||||||
console.log(require(scriptPath)({context}))
|
console.log(require(scriptPath)({context}))
|
||||||
```
|
```
|
||||||
|
_(Note that the script path given to `require()` must be an absolute path in this case.)_
|
||||||
|
|
||||||
And then export a function from your module:
|
And then export a function from your module:
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue