From f109341c4b36259e23f051a081ea38e14756e05c Mon Sep 17 00:00:00 2001 From: Mike Smith <89040888+smiggiddy@users.noreply.github.com> Date: Thu, 9 May 2024 20:28:21 -0400 Subject: [PATCH] initial --- Dockerfile | 9 +++++++++ action.yml | 17 +++++++++++++++++ entrypoint.sh | 6 ++++++ 3 files changed, 32 insertions(+) create mode 100644 Dockerfile create mode 100644 action.yml create mode 100644 entrypoint.sh diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..218d049 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +# Container image that runs your code +FROM alpine:3.10 + +# 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/action.yml b/action.yml new file mode 100644 index 0000000..da7c35e --- /dev/null +++ b/action.yml @@ -0,0 +1,17 @@ +# action.yml +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 100644 index 0000000..259bf19 --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,6 @@ +#!/bin/sh -l + +echo "Hello $1" +time=$(date) +echo "time=$time" >> $GITHUB_OUTPUT +