This commit is contained in:
Mike Smith 2024-05-09 20:28:21 -04:00
commit f109341c4b
3 changed files with 32 additions and 0 deletions

9
Dockerfile Normal file
View file

@ -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"]

17
action.yml Normal file
View file

@ -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 }}

6
entrypoint.sh Normal file
View file

@ -0,0 +1,6 @@
#!/bin/sh -l
echo "Hello $1"
time=$(date)
echo "time=$time" >> $GITHUB_OUTPUT