From b91d5781588e6e9f27ca9cf602aa2f0d8c384c3f Mon Sep 17 00:00:00 2001 From: Jason Bullen <24844853+Bullenj01@users.noreply.github.com> Date: Thu, 17 Dec 2020 08:33:49 -0500 Subject: [PATCH 1/2] Update README.md Add example of using console.log to display attributes of object context --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 177ea311f..125bdd5a8 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,15 @@ See [development.md](/docs/development.md). ## 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 "result" key. From f4f25ebaab617f8f1bd0a134ae1920906887c649 Mon Sep 17 00:00:00 2001 From: Jason Bullen <24844853+Bullenj01@users.noreply.github.com> Date: Thu, 17 Dec 2020 11:45:30 -0500 Subject: [PATCH 2/2] Move to examples section --- README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 125bdd5a8..c582ce685 100644 --- a/README.md +++ b/README.md @@ -33,15 +33,6 @@ See [development.md](/docs/development.md). ## 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 "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. +### 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 ```yaml