diff --git a/.github/actions/action.yaml b/.github/actions/action.yaml new file mode 100644 index 0000000..90f276d --- /dev/null +++ b/.github/actions/action.yaml @@ -0,0 +1,16 @@ +name: "Hello World" +description: "Greet someone and record the time" +inputs: + who-to-greet: # id of input + description: "Who to greet" + required: true + default: "World" +outputs: + time: # id of output + description: "The time we greeted you" + +runs: + using: "docker" + image: "Dockerfile" + args: + - ${{ inputs.who-to-greet }} diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..9a86c73 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,5 @@ +FROM alpine:3.10 + +COPY entrypoint.sh /entrypoint.sh + +ENTRYPOINT [ "./entrypoint.sh" ] diff --git a/README.md b/README.md new file mode 100644 index 0000000..4638115 --- /dev/null +++ b/README.md @@ -0,0 +1,21 @@ +# Hello world docker 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-docker-action@v2 +with: + who-to-greet: 'Mona the Octocat' diff --git a/entrypoint.sh b/entrypoint.sh old mode 100755 new mode 100644