/hello-world-javascript-action

learn how to write javascript action

Primary LanguageJavaScript

Hello world javascript action

This action prints "Hello World" or "Hello" + the name of a person to greet to the log.

Inputs

who-to-greet

Required The name of the person to greet. Default "World".

Outputs

time

The time we greeted you.

Example usage

uses: actions/hello-world-javascript-action@v1.1 with: who-to-greet: 'Mona the Octocat'

on: [push]

jobs:
  hello_world_job:
    runs-on: ubuntu-latest
    name: A job to say hello
    steps:
      # To use this repository's private action,
      # you must check out the repository
      - name: Checkout
        uses: actions/checkout@v2
      - name: Hello world action step
        uses: "cuixiaorui/hello-world-javascript-action" # Uses an action in the root directory
        id: hello
        with:
          who-to-greet: 'Mona the Octocat'
      # Use the output from the `hello` step
      - name: Get the output time
        run: echo "The time was ${{ steps.hello.outputs.time }}"