diff --git a/Dockerfile b/Dockerfile index 123da62..496dba3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,8 @@ +# Container image that runs your code FROM alpine:latest -ADD entrypoint.sh /entrypoint.sh -RUN chmod +x /entrypoint.sh + +# 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"] \ No newline at end of file diff --git a/action.yml b/action.yml index 3f84e67..7e2c158 100644 --- a/action.yml +++ b/action.yml @@ -4,11 +4,16 @@ author: 'Ricardo Canastro' inputs: source: description: 'Source file' + required: true target: description: 'Target file' + required: true runs: using: 'docker' image: 'Dockerfile' + args: + - ${{inputs.source}} + - ${{inputs.target}} branding: icon: 'copy' color: 'green' \ No newline at end of file diff --git a/entrypoint.sh b/entrypoint.sh old mode 100644 new mode 100755 index a31d73f..358be33 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,6 +1,3 @@ -#!/bin/bash +#!/bin/sh -l -set -e -set -o pipefail - -sh -c "cp $*" \ No newline at end of file +cp $1 $2 \ No newline at end of file