commit 8f3ddc9df1fba1d15e54004d06cda395a1e552fe Author: lubiana Date: Sun Jun 16 11:04:24 2024 +0200 init diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57f1cb2 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/.idea/ \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..af9e269 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,8 @@ +# Container image that runs your code +FROM alpine:edge + +# 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..782c830 --- /dev/null +++ b/action.yml @@ -0,0 +1,16 @@ +# 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..3fee027 --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,5 @@ +#!/bin/sh -l + +echo "Hello $1" +time=$(date) +echo "time=$time" >> $GITHUB_OUTPUT