Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Clem authored and GitHub committed Jul 29, 2020
1 parent a656f43 commit 07ecbc5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,11 @@ jobs:
- uses: actions/github-script@v2
with:
script: |
const script = require(`${process.env.GITHUB_WORKSPACE}/.path/to/script.js`)
console.log(script(github, context))
const script = require(`${process.env.GITHUB_WORKSPACE}/path/to/script.js`)
console.log(script({github, context}))
```

*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)*
*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).*

And then export a function from your module:

Expand Down

0 comments on commit 07ecbc5

Please sign in to comment.