mirror of
https://github.com/actions/github-script.git
synced 2025-12-21 15:22:30 +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:
@@ -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:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user