Skip to content

Commit 030bda0

Browse files
committed
Merge branch 'master' of github.com:actions/hello-world-javascript-action
2 parents 714607a + 2b62cf0 commit 030bda0

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Hello world JavaScript action
22

3-
This action prints "Hello World" or "Hello" + the name of a person to greet to the log.
3+
This action prints "Hello World" or "Hello" + the name of a person to greet to the log. To learn how this action was built, see "[Creating a JavaScript action](https://help.github.com/en/articles/creating-a-javascript-action)" in the GitHub Help documentation.
44

55
## Inputs
66

action.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# action.yml
21
name: 'Hello World'
32
description: 'Greet someone and record the time'
43
inputs:

index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@ const core = require('@actions/core');
22
const github = require('@actions/github');
33

44
try {
5+
// `who-to-greet` input defined in action metadata file
56
const nameToGreet = core.getInput('who-to-greet');
67
console.log(`Hello ${nameToGreet}!`);
78
const time = (new Date()).toTimeString();
89
core.setOutput("time", time);
10+
// Get the JSON webhook payload for the event that triggered the workflow
911
const payload = JSON.stringify(github.context.payload, undefined, 2)
1012
console.log(`The event payload: ${payload}`);
1113
} catch (error) {

0 commit comments

Comments
 (0)