mirror of
https://github.com/actions/github-script.git
synced 2025-12-08 16:16:21 +00:00
Move to examples section
This commit is contained in:
18
README.md
18
README.md
@@ -33,15 +33,6 @@ See [development.md](/docs/development.md).
|
|||||||
|
|
||||||
## Reading step results
|
## Reading step results
|
||||||
|
|
||||||
Print the available attributes of context:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
- name: View context attributes
|
|
||||||
uses: actions/github-script@0.9.0
|
|
||||||
with:
|
|
||||||
script: console.log(context)
|
|
||||||
```
|
|
||||||
|
|
||||||
The return value of the script will be in the step's outputs under the
|
The return value of the script will be in the step's outputs under the
|
||||||
"result" key.
|
"result" key.
|
||||||
|
|
||||||
@@ -80,6 +71,15 @@ in case you need to use a non-default token.
|
|||||||
|
|
||||||
By default, github-script will use the token provided to your workflow.
|
By default, github-script will use the token provided to your workflow.
|
||||||
|
|
||||||
|
### Print the available attributes of context:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- name: View context attributes
|
||||||
|
uses: actions/github-script@0.9.0
|
||||||
|
with:
|
||||||
|
script: console.log(context)
|
||||||
|
```
|
||||||
|
|
||||||
### Comment on an issue
|
### Comment on an issue
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
|
|||||||
Reference in New Issue
Block a user