Skip to content

Commit 43e3799

Browse files
Initial commit
0 parents  commit 43e3799

File tree

373 files changed

+77108
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

373 files changed

+77108
-0
lines changed

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2019 GitHub Actions
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Hello world JavaScript action
2+
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.
4+
5+
## Inputs
6+
7+
### `who-to-greet`
8+
9+
**Required** The name of the person to greet. Default `"World"`.
10+
11+
## Outputs
12+
13+
### `time`
14+
15+
The time we greeted you.
16+
17+
## Example usage
18+
19+
```yaml
20+
uses: actions/hello-world-javascript-action@master
21+
with:
22+
who-to-greet: 'Mona the Octocat'
23+
```

action.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: 'Hello World'
2+
description: 'Greet someone and record the time'
3+
inputs:
4+
who-to-greet: # id of input
5+
description: 'Who to greet'
6+
required: true
7+
default: 'World'
8+
outputs:
9+
time: # id of output
10+
description: 'The time we we greeted you'
11+
runs:
12+
using: 'node12'
13+
main: 'index.js'

index.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
const core = require('@actions/core');
2+
const github = require('@actions/github');
3+
4+
try {
5+
// `who-to-greet` input defined in action metadata file
6+
const nameToGreet = core.getInput('who-to-greet');
7+
console.log(`Hello ${nameToGreet}!`);
8+
const time = (new Date()).toTimeString();
9+
core.setOutput("time", time);
10+
// Get the JSON webhook payload for the event that triggered the workflow
11+
const payload = JSON.stringify(github.context.payload, undefined, 2)
12+
console.log(`The event payload: ${payload}`);
13+
} catch (error) {
14+
core.setFailed(error.message);
15+
}

node_modules/.bin/semver

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/.bin/which

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/@actions/core/LICENSE.md

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/@actions/core/README.md

Lines changed: 97 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/@actions/core/lib/command.d.ts

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/@actions/core/lib/command.js

Lines changed: 66 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)