diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..b0d0bf3 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,8 @@ +# Container image that runs your code +FROM alpine:3.17.2 + +# Copies your code file from your action repository to the filesystem path `/` of the container +COPY entrypoint.sh /entrypoint.sh + +# Code file to execute when the docker container starts up (`entrypoint.sh`) +ENTRYPOINT ["/entrypoint.sh"] diff --git a/README.md b/README.md index 13e4433..9017908 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,23 @@ This repository contains the source code for the Speckle Automate GitHub Action. ## Documentation -Comprehensive developer and user documentation can be found in our: +### Inputs -**📚 [Speckle Docs website](https://speckle.guide/dev/)** +#### `who-to-greet` + +**Required** The name of the person to greet. Default `"World"`. + +### Outputs + +#### `time` + +The time we greeted you. + +### Example usage + +uses: actions/speckle-automate-github-action@v2 +with: + who-to-greet: 'Mona the Octocat' ## Developing & Debugging diff --git a/action.yaml b/action.yaml new file mode 100644 index 0000000..9b136f8 --- /dev/null +++ b/action.yaml @@ -0,0 +1,15 @@ +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/entrypoint.sh b/entrypoint.sh new file mode 100755 index 0000000..3fee027 --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,5 @@ +#!/bin/sh -l + +echo "Hello $1" +time=$(date) +echo "time=$time" >> $GITHUB_OUTPUT